1*404b540aSrobert /* 2*404b540aSrobert Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc. 3*404b540aSrobert See license.html for license. 4*404b540aSrobert 5*404b540aSrobert This just provides documentation for stuff that doesn't need to be in the 6*404b540aSrobert source headers themselves. It is a ".cc" file for the sole cheesy reason 7*404b540aSrobert that it triggers many different text editors into doing Nice Things when 8*404b540aSrobert typing comments. However, it is mentioned nowhere except the *cfg.in files. 9*404b540aSrobert 10*404b540aSrobert Some actual code (declarations) is exposed here, but no compiler ever 11*404b540aSrobert sees it. The decls must be visible to doxygen, and sometimes their real 12*404b540aSrobert declarations are not visible, or not visible in a way we want. 13*404b540aSrobert 14*404b540aSrobert Pieces separated by '// //' lines will usually not be presented to the 15*404b540aSrobert user on the same page. 16*404b540aSrobert */ 17*404b540aSrobert 18*404b540aSrobert // // // // // // // // // // // // // // // // // // // // // // // // 19*404b540aSrobert /** @namespace std 20*404b540aSrobert * @brief Everything defined by the ISO C++ Standard is within 21*404b540aSrobert * namespace <a class="el" href="namespacestd.html">std</a>. 22*404b540aSrobert */ 23*404b540aSrobert /** @namespace std::__detail 24*404b540aSrobert * @brief Implementation details not part of the namespace <a class="el" 25*404b540aSrobert * href="namespacestd.html">std</a> interface. 26*404b540aSrobert */ 27*404b540aSrobert /** @namespace std::tr1 28*404b540aSrobert * @brief Everything defined by the ISO C++ TR1 is within namespace std::tr1. 29*404b540aSrobert */ 30*404b540aSrobert /** @namespace std::tr1::__detail 31*404b540aSrobert * @brief Implementation details not part of the namespace std::tr1 interface. 32*404b540aSrobert */ 33*404b540aSrobert /** @namespace __gnu_cxx 34*404b540aSrobert * @brief GNU extensions for public use. 35*404b540aSrobert */ 36*404b540aSrobert /** @namespace __gnu_cxx::__detail 37*404b540aSrobert * @brief Implementation details not part of the namespace __gnu_cxx 38*404b540aSrobert * interface. 39*404b540aSrobert */ 40*404b540aSrobert /** @namespace __gnu_cxx::typelist 41*404b540aSrobert * @brief GNU typelist extensions for public compile-time use. 42*404b540aSrobert */ 43*404b540aSrobert /** @namespace __gnu_internal 44*404b540aSrobert * @brief GNU implemenation details, not for public use or 45*404b540aSrobert * export. Used only when anonymous namespaces cannot be substituted. 46*404b540aSrobert */ 47*404b540aSrobert /** @namespace __gnu_debug 48*404b540aSrobert * @brief GNU debug mode classes for public use. 49*404b540aSrobert */ 50*404b540aSrobert // // // // // // // // // // // // // // // // // // // // // // // // 51*404b540aSrobert /** @addtogroup SGIextensions STL extensions from SGI 52*404b540aSrobert Because libstdc++ based its implementation of the STL subsections of 53*404b540aSrobert the library on the SGI 3.3 implementation, we inherited their extensions 54*404b540aSrobert as well. 55*404b540aSrobert 56*404b540aSrobert They are additionally documented in the 57*404b540aSrobert <a href="http://gcc.gnu.org/onlinedocs/libstdc++/documentation.html"> 58*404b540aSrobert online documentation</a>, a copy of which is also shipped with the 59*404b540aSrobert library source code (in .../docs/html/documentation.html). You can also 60*404b540aSrobert read the documentation <a href="http://www.sgi.com/tech/stl/">on SGI's 61*404b540aSrobert site</a>, which is still running even though the code is not maintained. 62*404b540aSrobert 63*404b540aSrobert <strong>NB</strong> that the following notes are pulled from various 64*404b540aSrobert comments all over the place, so they may seem stilted. 65*404b540aSrobert <hr> 66*404b540aSrobert */ 67*404b540aSrobert 68*404b540aSrobert // // // // // // // // // // // // // // // // // // // // // // // // 69*404b540aSrobert // This is standalone because, unlike the functor introduction, there is no 70*404b540aSrobert // single header file which serves as a base "all containers must include 71*404b540aSrobert // this header". We do some quoting of 14882 here. 72*404b540aSrobert /** @addtogroup Containers Containers 73*404b540aSrobert Containers are collections of objects. 74*404b540aSrobert 75*404b540aSrobert A container may hold any type which meets certain requirements, but the type 76*404b540aSrobert of contained object is chosen at compile time, and all objects in a given 77*404b540aSrobert container must be of the same type. (Polymorphism is possible by declaring a 78*404b540aSrobert container of pointers to a base class and then populating it with pointers to 79*404b540aSrobert instances of derived classes. Variant value types such as the @c any class 80*404b540aSrobert from <a href="http://www.boost.org/">Boost</a> can also be used. 81*404b540aSrobert 82*404b540aSrobert All contained types must be @c Assignable and @c CopyConstructible. 83*404b540aSrobert Specific containers may place additional requirements on the types of 84*404b540aSrobert their contained objects. 85*404b540aSrobert 86*404b540aSrobert Containers manage memory allocation and deallocation themselves when 87*404b540aSrobert storing your objects. The objects are destroyed when the container is 88*404b540aSrobert itself destroyed. Note that if you are storing pointers in a container, 89*404b540aSrobert @c delete is @e not automatically called on the pointers before destroying them. 90*404b540aSrobert 91*404b540aSrobert All containers must meet certain requirements, summarized in 92*404b540aSrobert <a href="tables.html">tables</a>. 93*404b540aSrobert 94*404b540aSrobert The standard containers are further refined into 95*404b540aSrobert @link Sequences Sequences@endlink and 96*404b540aSrobert @link Assoc_containers Associative Containers@endlink. 97*404b540aSrobert */ 98*404b540aSrobert 99*404b540aSrobert /** @addtogroup Sequences Sequences 100*404b540aSrobert Sequences arrange a collection of objects into a strictly linear order. 101*404b540aSrobert 102*404b540aSrobert The differences between sequences are usually due to one or both of the 103*404b540aSrobert following: 104*404b540aSrobert - memory management 105*404b540aSrobert - algorithmic complexity 106*404b540aSrobert 107*404b540aSrobert As an example of the first case, @c vector is required to use a contiguous 108*404b540aSrobert memory layout, while other sequences such as @c deque are not. 109*404b540aSrobert 110*404b540aSrobert The prime reason for choosing one sequence over another should be based on 111*404b540aSrobert the second category of differences, algorithmic complexity. For example, if 112*404b540aSrobert you need to perform many inserts and removals from the middle of a sequence, 113*404b540aSrobert @c list would be ideal. But if you need to perform constant-time access to 114*404b540aSrobert random elements of the sequence, then @c list should not be used. 115*404b540aSrobert 116*404b540aSrobert All sequences must meet certain requirements, summarized in 117*404b540aSrobert <a href="tables.html">tables</a>. 118*404b540aSrobert */ 119*404b540aSrobert 120*404b540aSrobert /** @addtogroup Assoc_containers Associative Containers 121*404b540aSrobert Associative containers allow fast retrieval of data based on keys. 122*404b540aSrobert 123*404b540aSrobert Each container type is parameterized on a @c Key type, and an ordering 124*404b540aSrobert relation used to sort the elements of the container. 125*404b540aSrobert 126*404b540aSrobert There should be more text here. 127*404b540aSrobert 128*404b540aSrobert All associative containers must meet certain requirements, summarized in 129*404b540aSrobert <a href="tables.html">tables</a>. 130*404b540aSrobert */ 131*404b540aSrobert 132*404b540aSrobert // // // // // // // // // // // // // // // // // // // // // // // // 133*404b540aSrobert /** @namespace abi 134*404b540aSrobert * @brief The cross-vendor C++ Application Binary Interface. A 135*404b540aSrobert * namespace alias to __cxxabiv1. 136*404b540aSrobert * 137*404b540aSrobert * A brief overview of an ABI is given in the libstdc++ FAQ, question 138*404b540aSrobert * 5.8 (you may have a copy of the FAQ locally, or you can view the online 139*404b540aSrobert * version at http://gcc.gnu.org/onlinedocs/libstdc++/faq/index.html#5_8). 140*404b540aSrobert * 141*404b540aSrobert * GCC subscribes to a relatively-new cross-vendor ABI for C++, sometimes 142*404b540aSrobert * called the IA64 ABI because it happens to be the native ABI for that 143*404b540aSrobert * platform. It is summarized at http://www.codesourcery.com/cxx-abi/ 144*404b540aSrobert * along with the current specification. 145*404b540aSrobert * 146*404b540aSrobert * For users of GCC greater than or equal to 3.x, entry points are 147*404b540aSrobert * available in <cxxabi.h>, which notes, <em>"It is not normally 148*404b540aSrobert * necessary for user programs to include this header, or use the 149*404b540aSrobert * entry points directly. However, this header is available should 150*404b540aSrobert * that be needed."</em> 151*404b540aSrobert */ 152*404b540aSrobert 153*404b540aSrobert namespace abi { 154*404b540aSrobert /** 155*404b540aSrobert @brief New ABI-mandated entry point in the C++ runtime library for demangling. 156*404b540aSrobert 157*404b540aSrobert @param mangled_name A NUL-terminated character string containing the name 158*404b540aSrobert to be demangled. 159*404b540aSrobert 160*404b540aSrobert @param output_buffer A region of memory, allocated with malloc, of 161*404b540aSrobert @a *length bytes, into which the demangled name 162*404b540aSrobert is stored. If @a output_buffer is not long enough, 163*404b540aSrobert it is expanded using realloc. @a output_buffer may 164*404b540aSrobert instead be NULL; in that case, the demangled name is 165*404b540aSrobert placed in a region of memory allocated with malloc. 166*404b540aSrobert 167*404b540aSrobert @param length If @a length is non-NULL, the length of the buffer containing 168*404b540aSrobert the demangled name is placed in @a *length. 169*404b540aSrobert 170*404b540aSrobert @param status @a *status is set to one of the following values: 171*404b540aSrobert - 0: The demangling operation succeeded. 172*404b540aSrobert - -1: A memory allocation failiure occurred. 173*404b540aSrobert - -2: @a mangled_name is not a valid name under the C++ ABI 174*404b540aSrobert mangling rules. 175*404b540aSrobert - -3: One of the arguments is invalid. 176*404b540aSrobert 177*404b540aSrobert @return A pointer to the start of the NUL-terminated demangled name, or NULL 178*404b540aSrobert if the demangling fails. The caller is responsible for deallocating 179*404b540aSrobert this memory using @c free. 180*404b540aSrobert 181*404b540aSrobert 182*404b540aSrobert The demangling is performed using the C++ ABI mangling rules, with 183*404b540aSrobert GNU extensions. For example, this function is used 184*404b540aSrobert in __gnu_cxx::__verbose_terminate_handler. See 185*404b540aSrobert http://gcc.gnu.org/onlinedocs/libstdc++/18_support/howto.html#5 for other 186*404b540aSrobert examples of use. 187*404b540aSrobert 188*404b540aSrobert @note The same demangling functionality is available via libiberty 189*404b540aSrobert (@c <libiberty/demangle.h> and @c libiberty.a) in GCC 3.1 and later, but that 190*404b540aSrobert requires explicit installation (@c --enable-install-libiberty) and uses a 191*404b540aSrobert different API, although the ABI is unchanged. 192*404b540aSrobert */ 193*404b540aSrobert char* __cxa_demangle (const char* mangled_name, char* output_buffer, 194*404b540aSrobert size_t* length, int* status); 195*404b540aSrobert } // namespace abi 196*404b540aSrobert 197*404b540aSrobert // // // // // // // // // // // // // // // // // // // // // // // // 198*404b540aSrobert /** @addtogroup binarysearch Binary search algorithms 199*404b540aSrobert These algorithms are variations of a classic binary search. They all assume 200*404b540aSrobert that the sequence being searched is already sorted. 201*404b540aSrobert 202*404b540aSrobert The number of comparisons will be logarithmic (and as few as possible). 203*404b540aSrobert The number of steps through the sequence will be logarithmic for 204*404b540aSrobert random-access iterators (e.g., pointers), and linear otherwise. 205*404b540aSrobert 206*404b540aSrobert The LWG has passed Defect Report 270, which notes: <em>The proposed 207*404b540aSrobert resolution reinterprets binary search. Instead of thinking about searching 208*404b540aSrobert for a value in a sorted range, we view that as an important special 209*404b540aSrobert case of a more general algorithm: searching for the partition point in a 210*404b540aSrobert partitioned range. We also add a guarantee that the old wording did not: 211*404b540aSrobert we ensure that the upper bound is no earlier than the lower bound, that 212*404b540aSrobert the pair returned by equal_range is a valid range, and that the first part 213*404b540aSrobert of that pair is the lower bound.</em> 214*404b540aSrobert 215*404b540aSrobert The actual effect of the first sentence is that a comparison functor 216*404b540aSrobert passed by the user doesn't necessarily need to induce a strict weak ordering 217*404b540aSrobert relation. Rather, it partitions the range. 218*404b540aSrobert */ 219*404b540aSrobert 220*404b540aSrobert // // // // // // // // // // // // // // // // // // // // // // // // 221*404b540aSrobert /** @addtogroup setoperations Set operation algorithms 222*404b540aSrobert These algorithms are common set operations performed on sequences that are 223*404b540aSrobert already sorted. 224*404b540aSrobert 225*404b540aSrobert The number of comparisons will be linear. 226*404b540aSrobert */ 227*404b540aSrobert 228*404b540aSrobert // // // // // // // // // // // // // // // // // // // // // // // // 229*404b540aSrobert 230*404b540aSrobert // // // // // // // // // // // // // // // // // // // // // // // // 231*404b540aSrobert /* * @addtogroup groupname description of group 232*404b540aSrobert placeholder text 233*404b540aSrobert */ 234*404b540aSrobert 235*404b540aSrobert // // // // // // // // // // // // // // // // // // // // // // // // 236*404b540aSrobert 237*404b540aSrobert // vim:et:noai: 238*404b540aSrobert 239