Commit 0eb95b0d by Benjamin Kosnik Committed by Benjamin Kosnik

streambuf: Adjust doxygen group markup.

2010-02-09  Benjamin Kosnik  <bkoz@redhat.com>

        * include/std/streambuf: Adjust doxygen group markup.
        * include/std/functional: Same.
        * include/ext/vstring.h: Same.
        * include/ext/pb_ds/assoc_container.hpp: Same.
        * include/ext/stdio_filebuf.h: Same.
        * include/ext/stdio_sync_filebuf.h: Same.
        * include/bits/localefwd.h: Same.
        * include/bits/functional_hash.h: Same.
        * include/bits/locale_classes.h: Same.
        * include/bits/locale_facets.h: Same.
        * include/bits/ios_base.h: Same.
        * include/bits/codecvt.h: Same.
        * include/bits/locale_facets_nonio.h: Same.

        * testsuite/27_io/ios_base/cons/assign_neg.cc: Adjust line numbers.
        * testsuite/27_io/ios_base/cons/copy_neg.cc: Same.

From-SVN: r156644
parent 52f12678
2010-02-09 Benjamin Kosnik <bkoz@redhat.com>
* include/std/streambuf: Adjust doxygen group markup.
* include/std/functional: Same.
* include/ext/vstring.h: Same.
* include/ext/pb_ds/assoc_container.hpp: Same.
* include/ext/stdio_filebuf.h: Same.
* include/ext/stdio_sync_filebuf.h: Same.
* include/bits/localefwd.h: Same.
* include/bits/functional_hash.h: Same.
* include/bits/locale_classes.h: Same.
* include/bits/locale_facets.h: Same.
* include/bits/ios_base.h: Same.
* include/bits/codecvt.h: Same.
* include/bits/locale_facets_nonio.h: Same.
* testsuite/27_io/ios_base/cons/assign_neg.cc: Adjust line numbers.
* testsuite/27_io/ios_base/cons/copy_neg.cc: Same.
2010-02-08 Benjamin Kosnik <bkoz@redhat.com> 2010-02-08 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/42460 PR libstdc++/42460
......
// Locale support (codecvt) -*- C++ -*- // Locale support (codecvt) -*- C++ -*-
// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, // Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
// 2009 Free Software Foundation, Inc. // 2009, 2010 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the // software; you can redistribute it and/or modify it under the
...@@ -262,9 +262,16 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -262,9 +262,16 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
do_max_length() const throw() = 0; do_max_length() const throw() = 0;
}; };
/// @brief class codecvt [22.2.1.5].
/// NB: Generic, mostly useless implementation.
template<typename _InternT, typename _ExternT, typename _StateT> /**
* @brief Primary class template codecvt.
* @ingroup locales
*
* NB: Generic, mostly useless implementation.
*
*/
template<typename _InternT, typename _ExternT, typename _StateT>
class codecvt class codecvt
: public __codecvt_abstract_base<_InternT, _ExternT, _StateT> : public __codecvt_abstract_base<_InternT, _ExternT, _StateT>
{ {
......
// functional_hash.h header -*- C++ -*- // functional_hash.h header -*- C++ -*-
// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. // Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the // software; you can redistribute it and/or modify it under the
...@@ -41,7 +41,15 @@ ...@@ -41,7 +41,15 @@
namespace std namespace std
{ {
/// Class template hash. /** @defgroup hashes Hashes
* @ingroup functors
*
* Hashing functors taking a variable type and returning a @c std::size_t.
*
* @{
*/
/// Primary class template hash.
template<typename _Tp> template<typename _Tp>
struct hash; struct hash;
...@@ -54,7 +62,7 @@ namespace std ...@@ -54,7 +62,7 @@ namespace std
{ return reinterpret_cast<size_t>(__p); } { return reinterpret_cast<size_t>(__p); }
}; };
/// Explicit specializations for integer types. // Explicit specializations for integer types.
#define _Cxx_hashtable_define_trivial_hash(_Tp) \ #define _Cxx_hashtable_define_trivial_hash(_Tp) \
template<> \ template<> \
struct hash<_Tp> : public std::unary_function<_Tp, size_t> \ struct hash<_Tp> : public std::unary_function<_Tp, size_t> \
...@@ -64,22 +72,51 @@ namespace std ...@@ -64,22 +72,51 @@ namespace std
{ return static_cast<size_t>(__val); } \ { return static_cast<size_t>(__val); } \
}; };
/// Explicit specialization for bool.
_Cxx_hashtable_define_trivial_hash(bool); _Cxx_hashtable_define_trivial_hash(bool);
/// Explicit specialization for char.
_Cxx_hashtable_define_trivial_hash(char); _Cxx_hashtable_define_trivial_hash(char);
/// Explicit specialization for signed char.
_Cxx_hashtable_define_trivial_hash(signed char); _Cxx_hashtable_define_trivial_hash(signed char);
/// Explicit specialization for unsigned char.
_Cxx_hashtable_define_trivial_hash(unsigned char); _Cxx_hashtable_define_trivial_hash(unsigned char);
/// Explicit specialization for wchar_t.
_Cxx_hashtable_define_trivial_hash(wchar_t); _Cxx_hashtable_define_trivial_hash(wchar_t);
#ifdef _GLIBCXX_USE_C99_STDINT_TR1 #ifdef _GLIBCXX_USE_C99_STDINT_TR1
/// Explicit specialization for char16_t.
_Cxx_hashtable_define_trivial_hash(char16_t); _Cxx_hashtable_define_trivial_hash(char16_t);
/// Explicit specialization for char32_t.
_Cxx_hashtable_define_trivial_hash(char32_t); _Cxx_hashtable_define_trivial_hash(char32_t);
#endif #endif
/// Explicit specialization for short.
_Cxx_hashtable_define_trivial_hash(short); _Cxx_hashtable_define_trivial_hash(short);
/// Explicit specialization for int.
_Cxx_hashtable_define_trivial_hash(int); _Cxx_hashtable_define_trivial_hash(int);
/// Explicit specialization for long.
_Cxx_hashtable_define_trivial_hash(long); _Cxx_hashtable_define_trivial_hash(long);
/// Explicit specialization for long long.
_Cxx_hashtable_define_trivial_hash(long long); _Cxx_hashtable_define_trivial_hash(long long);
/// Explicit specialization for unsigned short.
_Cxx_hashtable_define_trivial_hash(unsigned short); _Cxx_hashtable_define_trivial_hash(unsigned short);
/// Explicit specialization for unsigned int.
_Cxx_hashtable_define_trivial_hash(unsigned int); _Cxx_hashtable_define_trivial_hash(unsigned int);
/// Explicit specialization for unsigned long.
_Cxx_hashtable_define_trivial_hash(unsigned long); _Cxx_hashtable_define_trivial_hash(unsigned long);
/// Explicit specialization for unsigned long long.
_Cxx_hashtable_define_trivial_hash(unsigned long long); _Cxx_hashtable_define_trivial_hash(unsigned long long);
#undef _Cxx_hashtable_define_trivial_hash #undef _Cxx_hashtable_define_trivial_hash
...@@ -87,7 +124,7 @@ namespace std ...@@ -87,7 +124,7 @@ namespace std
// Fowler / Noll / Vo (FNV) Hash (type FNV-1a) // Fowler / Noll / Vo (FNV) Hash (type FNV-1a)
// (Used by the next specializations of std::tr1::hash.) // (Used by the next specializations of std::tr1::hash.)
/// Dummy generic implementation (for sizeof(size_t) != 4, 8). // Dummy generic implementation (for sizeof(size_t) != 4, 8).
template<size_t = sizeof(size_t)> template<size_t = sizeof(size_t)>
struct _Fnv_hash struct _Fnv_hash
{ {
...@@ -202,6 +239,7 @@ namespace std ...@@ -202,6 +239,7 @@ namespace std
} }
}; };
/// Explicit specializations for string.
template<> template<>
struct hash<string> struct hash<string>
: public std::unary_function<string, size_t> : public std::unary_function<string, size_t>
...@@ -212,6 +250,7 @@ namespace std ...@@ -212,6 +250,7 @@ namespace std
}; };
#ifdef _GLIBCXX_USE_WCHAR_T #ifdef _GLIBCXX_USE_WCHAR_T
/// Explicit specializations for wstring.
template<> template<>
struct hash<wstring> struct hash<wstring>
: public std::unary_function<wstring, size_t> : public std::unary_function<wstring, size_t>
...@@ -226,6 +265,7 @@ namespace std ...@@ -226,6 +265,7 @@ namespace std
#endif #endif
#ifdef _GLIBCXX_USE_C99_STDINT_TR1 #ifdef _GLIBCXX_USE_C99_STDINT_TR1
/// Explicit specializations for u16string.
template<> template<>
struct hash<u16string> struct hash<u16string>
: public std::unary_function<u16string, size_t> : public std::unary_function<u16string, size_t>
...@@ -238,6 +278,7 @@ namespace std ...@@ -238,6 +278,7 @@ namespace std
} }
}; };
/// Explicit specializations for u32string.
template<> template<>
struct hash<u32string> struct hash<u32string>
: public std::unary_function<u32string, size_t> : public std::unary_function<u32string, size_t>
...@@ -251,6 +292,7 @@ namespace std ...@@ -251,6 +292,7 @@ namespace std
}; };
#endif #endif
/// Explicit specializations for error_code.
template<> template<>
struct hash<error_code> struct hash<error_code>
: public std::unary_function<error_code, size_t> : public std::unary_function<error_code, size_t>
...@@ -262,6 +304,7 @@ namespace std ...@@ -262,6 +304,7 @@ namespace std
return _Fnv_hash<>::hash(__p, sizeof(__e)); return _Fnv_hash<>::hash(__p, sizeof(__e));
} }
}; };
// @} group hashes
} }
#endif // _FUNCTIONAL_HASH_H #endif // _FUNCTIONAL_HASH_H
...@@ -457,16 +457,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -457,16 +457,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
register_callback(event_callback __fn, int __index); register_callback(event_callback __fn, int __index);
protected: protected:
//@{
/**
* ios_base data members (doc me)
*/
streamsize _M_precision; streamsize _M_precision;
streamsize _M_width; streamsize _M_width;
fmtflags _M_flags; fmtflags _M_flags;
iostate _M_exception; iostate _M_exception;
iostate _M_streambuf_state; iostate _M_streambuf_state;
//@}
// 27.4.2.6 Members for callbacks // 27.4.2.6 Members for callbacks
// 27.4.2.6 ios_base callbacks // 27.4.2.6 ios_base callbacks
......
...@@ -47,6 +47,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -47,6 +47,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
// 22.1.1 Class locale // 22.1.1 Class locale
/** /**
* @brief Container class for localization functionality. * @brief Container class for localization functionality.
* @ingroup locales
* *
* The locale class is first a class wrapper for C library locales. It is * The locale class is first a class wrapper for C library locales. It is
* also an extensible container for user-defined localization. A locale is * also an extensible container for user-defined localization. A locale is
...@@ -325,6 +326,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -325,6 +326,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
// 22.1.1.1.2 Class locale::facet // 22.1.1.1.2 Class locale::facet
/** /**
* @brief Localization functionality base class. * @brief Localization functionality base class.
* @ingroup locales
* *
* The facet class is the base class for a localization feature, such as * The facet class is the base class for a localization feature, such as
* money, time, and number printing. It provides common support for facets * money, time, and number printing. It provides common support for facets
...@@ -419,6 +421,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -419,6 +421,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
// 22.1.1.1.3 Class locale::id // 22.1.1.1.3 Class locale::id
/** /**
* @brief Facet ID class. * @brief Facet ID class.
* @ingroup locales
* *
* The ID class provides facets with an index used to identify them. * The ID class provides facets with an index used to identify them.
* Every facet class must define a public static member locale::id, or be * Every facet class must define a public static member locale::id, or be
......
...@@ -130,7 +130,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -130,7 +130,6 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
// 22.2.1.1 Template class ctype // 22.2.1.1 Template class ctype
// Include host and configuration specific ctype enums for ctype_base. // Include host and configuration specific ctype enums for ctype_base.
// Common base for ctype<_CharT>.
/** /**
* @brief Common base for ctype facet * @brief Common base for ctype facet
* *
...@@ -583,9 +582,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -583,9 +582,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
char __dfault, char* __dest) const = 0; char __dfault, char* __dest) const = 0;
}; };
// NB: Generic, mostly useless implementation.
/** /**
* @brief Template ctype facet * @brief Primary class template ctype facet.
* @ingroup locales
* *
* This template class defines classification and conversion functions for * This template class defines classification and conversion functions for
* character sets. It wraps <cctype> functionality. Ctype gets used by * character sets. It wraps <cctype> functionality. Ctype gets used by
...@@ -661,9 +660,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -661,9 +660,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
template<typename _CharT> template<typename _CharT>
locale::id ctype<_CharT>::id; locale::id ctype<_CharT>::id;
// 22.2.1.3 ctype<char> specialization.
/** /**
* @brief The ctype<char> specialization. * @brief The ctype<char> specialization.
* @ingroup locales
* *
* This class defines classification and conversion functions for * This class defines classification and conversion functions for
* the char type. It gets used by char streams for many I/O * the char type. It gets used by char streams for many I/O
...@@ -1160,9 +1159,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -1160,9 +1159,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}; };
#ifdef _GLIBCXX_USE_WCHAR_T #ifdef _GLIBCXX_USE_WCHAR_T
// 22.2.1.3 ctype<wchar_t> specialization
/** /**
* @brief The ctype<wchar_t> specialization. * @brief The ctype<wchar_t> specialization.
* @ingroup locales
* *
* This class defines classification and conversion functions for the * This class defines classification and conversion functions for the
* wchar_t type. It gets used by wchar_t streams for many I/O operations. * wchar_t type. It gets used by wchar_t streams for many I/O operations.
...@@ -1620,7 +1619,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -1620,7 +1619,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
} }
/** /**
* @brief Numpunct facet. * @brief Primary class template numpunct.
* @ingroup locales
* *
* This facet stores several pieces of information related to printing and * This facet stores several pieces of information related to printing and
* scanning numbers, such as the decimal point character. It takes a * scanning numbers, such as the decimal point character. It takes a
...@@ -1893,7 +1893,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -1893,7 +1893,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_GLIBCXX_BEGIN_LDBL_NAMESPACE _GLIBCXX_BEGIN_LDBL_NAMESPACE
/** /**
* @brief Facet for parsing number strings. * @brief Primary class template num_get.
* @ingroup locales
* *
* This facet encapsulates the code to parse and return a number * This facet encapsulates the code to parse and return a number
* from a string. It is used by the istream numeric extraction * from a string. It is used by the istream numeric extraction
...@@ -2231,7 +2232,8 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE ...@@ -2231,7 +2232,8 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE
/** /**
* @brief Facet for converting numbers to strings. * @brief Primary class template num_put.
* @ingroup locales
* *
* This facet encapsulates the code to convert a number to a string. It is * This facet encapsulates the code to convert a number to a string. It is
* used by the ostream numeric insertion operators. * used by the ostream numeric insertion operators.
......
...@@ -42,9 +42,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -42,9 +42,10 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/** /**
* @brief Time format ordering data. * @brief Time format ordering data.
* @ingroup locales
* *
* This class provides an enum representing different orderings of day, * This class provides an enum representing different orderings of
* month, and year. * time: day, month, and year.
*/ */
class time_base class time_base
{ {
...@@ -346,7 +347,8 @@ _GLIBCXX_END_NAMESPACE ...@@ -346,7 +347,8 @@ _GLIBCXX_END_NAMESPACE
_GLIBCXX_BEGIN_NAMESPACE(std) _GLIBCXX_BEGIN_NAMESPACE(std)
/** /**
* @brief Facet for parsing dates and times. * @brief Primary class template time_get.
* @ingroup locales
* *
* This facet encapsulates the code to parse and return a date or * This facet encapsulates the code to parse and return a date or
* time from a string. It is used by the istream numeric * time from a string. It is used by the istream numeric
...@@ -693,7 +695,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -693,7 +695,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
}; };
/** /**
* @brief Facet for outputting dates and times. * @brief Primary class template time_put.
* @ingroup locales
* *
* This facet encapsulates the code to format and output dates and times * This facet encapsulates the code to format and output dates and times
* according to formats used by strftime(). * according to formats used by strftime().
...@@ -820,6 +823,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -820,6 +823,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/** /**
* @brief Money format ordering data. * @brief Money format ordering data.
* @ingroup locales
* *
* This class contains an ordered array of 4 fields to represent the * This class contains an ordered array of 4 fields to represent the
* pattern for formatting a money amount. Each field may contain one entry * pattern for formatting a money amount. Each field may contain one entry
...@@ -915,7 +919,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -915,7 +919,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
} }
/** /**
* @brief Facet for formatting data for money amounts. * @brief Primary class template moneypunct.
* @ingroup locales
* *
* This facet encapsulates the punctuation, grouping and other formatting * This facet encapsulates the punctuation, grouping and other formatting
* features of money amount string representations. * features of money amount string representations.
...@@ -1343,7 +1348,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -1343,7 +1348,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_GLIBCXX_BEGIN_LDBL_NAMESPACE _GLIBCXX_BEGIN_LDBL_NAMESPACE
/** /**
* @brief Facet for parsing monetary amounts. * @brief Primary class template money_get.
* @ingroup locales
* *
* This facet encapsulates the code to parse and return a monetary * This facet encapsulates the code to parse and return a monetary
* amount from a string. * amount from a string.
...@@ -1493,7 +1499,8 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE ...@@ -1493,7 +1499,8 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE
locale::id money_get<_CharT, _InIter>::id; locale::id money_get<_CharT, _InIter>::id;
/** /**
* @brief Facet for outputting monetary amounts. * @brief Primary class template money_put.
* @ingroup locales
* *
* This facet encapsulates the code to format and output a monetary * This facet encapsulates the code to format and output a monetary
* amount. * amount.
...@@ -1650,6 +1657,7 @@ _GLIBCXX_END_LDBL_NAMESPACE ...@@ -1650,6 +1657,7 @@ _GLIBCXX_END_LDBL_NAMESPACE
/** /**
* @brief Messages facet base class providing catalog typedef. * @brief Messages facet base class providing catalog typedef.
* @ingroup locales
*/ */
struct messages_base struct messages_base
{ {
...@@ -1657,7 +1665,8 @@ _GLIBCXX_END_LDBL_NAMESPACE ...@@ -1657,7 +1665,8 @@ _GLIBCXX_END_LDBL_NAMESPACE
}; };
/** /**
* @brief Facet for handling message catalogs * @brief Primary class template messages.
* @ingroup locales
* *
* This facet encapsulates the code to retrieve messages from * This facet encapsulates the code to retrieve messages from
* message catalogs. The only thing defined by the standard for this facet * message catalogs. The only thing defined by the standard for this facet
...@@ -1881,7 +1890,7 @@ _GLIBCXX_END_LDBL_NAMESPACE ...@@ -1881,7 +1890,7 @@ _GLIBCXX_END_LDBL_NAMESPACE
template<typename _CharT> template<typename _CharT>
locale::id messages<_CharT>::id; locale::id messages<_CharT>::id;
// Specializations for required instantiations. /// Specializations for required instantiations.
template<> template<>
string string
messages<char>::do_get(catalog, int, int, const string&) const; messages<char>::do_get(catalog, int, int, const string&) const;
......
// Locale support -*- C++ -*- // Locale support -*- C++ -*-
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
// 2006, 2007, 2009 // 2006, 2007, 2009, 2010
// Free Software Foundation, Inc. // Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
...@@ -45,6 +45,12 @@ ...@@ -45,6 +45,12 @@
_GLIBCXX_BEGIN_NAMESPACE(std) _GLIBCXX_BEGIN_NAMESPACE(std)
/**
* @defgroup locales Locales
*
* Classes and functions for internationalization and localization.
*/
// 22.1.1 Locale // 22.1.1 Locale
class locale; class locale;
......
// -*- C++ -*- // -*- C++ -*-
// Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc. // Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the terms // software; you can redistribute it and/or modify it under the terms
...@@ -49,10 +49,25 @@ ...@@ -49,10 +49,25 @@
namespace __gnu_pbds namespace __gnu_pbds
{ {
/** @defgroup pbds Policy-Based Data Structures
* @ingroup extensions
*
* This is a library of policy-based elementary data structures:
* associative containers and priority queues. It is designed for
* high-performance, flexibility, semantic safety, and conformance
* to the corresponding containers in std (except for some points
* where it differs by design).
*
* For details, see:
* http://gcc.gnu.org/onlinedocs/libstdc++/ext/pb_ds/index.html
*
* @{
*/
#define PB_DS_BASE_C_DEC \ #define PB_DS_BASE_C_DEC \
detail::container_base_dispatch<Key, Mapped, Tag, Policy_Tl, Allocator>::type detail::container_base_dispatch<Key, Mapped, Tag, Policy_Tl, Allocator>::type
// An abstract basic associative container. /// An abstract basic associative container.
template<typename Key, template<typename Key,
typename Mapped, typename Mapped,
typename Tag, typename Tag,
...@@ -115,7 +130,7 @@ namespace __gnu_pbds ...@@ -115,7 +130,7 @@ namespace __gnu_pbds
container_base<Key, Mapped, Tag, typename __gnu_cxx::typelist::append< \ container_base<Key, Mapped, Tag, typename __gnu_cxx::typelist::append< \
typename __gnu_cxx::typelist::create4<Hash_Fn, Eq_Fn, Resize_Policy, detail::integral_constant<int, Store_Hash> >::type, Policy_TL>::type, Allocator> typename __gnu_cxx::typelist::create4<Hash_Fn, Eq_Fn, Resize_Policy, detail::integral_constant<int, Store_Hash> >::type, Policy_TL>::type, Allocator>
// An abstract basic hash-based associative container. /// An abstract basic hash-based associative container.
template<typename Key, template<typename Key,
typename Mapped, typename Mapped,
typename Hash_Fn, typename Hash_Fn,
...@@ -152,7 +167,7 @@ namespace __gnu_pbds ...@@ -152,7 +167,7 @@ namespace __gnu_pbds
cc_hash_tag, \ cc_hash_tag, \
typename __gnu_cxx::typelist::create1<Comb_Hash_Fn>::type, Allocator> typename __gnu_cxx::typelist::create1<Comb_Hash_Fn>::type, Allocator>
// A concrete collision-chaining hash-based associative container. /// A concrete collision-chaining hash-based associative container.
template<typename Key, template<typename Key,
typename Mapped, typename Mapped,
typename Hash_Fn = typename detail::default_hash_fn<Key>::type, typename Hash_Fn = typename detail::default_hash_fn<Key>::type,
...@@ -289,7 +304,7 @@ namespace __gnu_pbds ...@@ -289,7 +304,7 @@ namespace __gnu_pbds
gp_hash_tag, \ gp_hash_tag, \
typename __gnu_cxx::typelist::create2<Comb_Probe_Fn, Probe_Fn>::type, Allocator> typename __gnu_cxx::typelist::create2<Comb_Probe_Fn, Probe_Fn>::type, Allocator>
// A concrete general-probing hash-based associative container. /// A concrete general-probing hash-based associative container.
template<typename Key, template<typename Key,
typename Mapped, typename Mapped,
typename Hash_Fn = typename detail::default_hash_fn<Key>::type, typename Hash_Fn = typename detail::default_hash_fn<Key>::type,
...@@ -455,7 +470,7 @@ namespace __gnu_pbds ...@@ -455,7 +470,7 @@ namespace __gnu_pbds
#define PB_DS_BASE_C_DEC \ #define PB_DS_BASE_C_DEC \
container_base<Key, Mapped, Tag, Policy_Tl, Allocator> container_base<Key, Mapped, Tag, Policy_Tl, Allocator>
// An abstract basic tree-like (tree, trie) associative container. /// An abstract basic tree-like (tree, trie) associative container.
template<typename Key, typename Mapped, typename Tag, template<typename Key, typename Mapped, typename Tag,
typename Node_Update, typename Policy_Tl, typename Allocator> typename Node_Update, typename Policy_Tl, typename Allocator>
class basic_tree : public PB_DS_BASE_C_DEC class basic_tree : public PB_DS_BASE_C_DEC
...@@ -485,7 +500,7 @@ namespace __gnu_pbds ...@@ -485,7 +500,7 @@ namespace __gnu_pbds
basic_tree<Key,Mapped,Tag,typename PB_DS_TREE_NODE_AND_IT_TRAITS_C_DEC::node_update, \ basic_tree<Key,Mapped,Tag,typename PB_DS_TREE_NODE_AND_IT_TRAITS_C_DEC::node_update, \
typename __gnu_cxx::typelist::create2<Cmp_Fn, PB_DS_TREE_NODE_AND_IT_TRAITS_C_DEC >::type, Allocator> typename __gnu_cxx::typelist::create2<Cmp_Fn, PB_DS_TREE_NODE_AND_IT_TRAITS_C_DEC >::type, Allocator>
// A concrete basic tree-based associative container. /// A concrete basic tree-based associative container.
template<typename Key, typename Mapped, typename Cmp_Fn = std::less<Key>, template<typename Key, typename Mapped, typename Cmp_Fn = std::less<Key>,
typename Tag = rb_tree_tag, typename Tag = rb_tree_tag,
template<typename Const_Node_Iterator, typename Node_Iterator, typename Cmp_Fn_, typename Allocator_> template<typename Const_Node_Iterator, typename Node_Iterator, typename Cmp_Fn_, typename Allocator_>
...@@ -556,7 +571,7 @@ namespace __gnu_pbds ...@@ -556,7 +571,7 @@ namespace __gnu_pbds
basic_tree<Key,Mapped,Tag, typename PB_DS_TRIE_NODE_AND_ITS_TRAITS::node_update, \ basic_tree<Key,Mapped,Tag, typename PB_DS_TRIE_NODE_AND_ITS_TRAITS::node_update, \
typename __gnu_cxx::typelist::create2<E_Access_Traits, PB_DS_TRIE_NODE_AND_ITS_TRAITS >::type, Allocator> typename __gnu_cxx::typelist::create2<E_Access_Traits, PB_DS_TRIE_NODE_AND_ITS_TRAITS >::type, Allocator>
// A concrete basic trie-based associative container. /// A concrete basic trie-based associative container.
template<typename Key, template<typename Key,
typename Mapped, typename Mapped,
typename E_Access_Traits = typename detail::default_trie_e_access_traits<Key>::type, typename E_Access_Traits = typename detail::default_trie_e_access_traits<Key>::type,
...@@ -629,7 +644,7 @@ namespace __gnu_pbds ...@@ -629,7 +644,7 @@ namespace __gnu_pbds
container_base<Key, Mapped, list_update_tag, \ container_base<Key, Mapped, list_update_tag, \
typename __gnu_cxx::typelist::create2<Eq_Fn, Update_Policy>::type, Allocator> typename __gnu_cxx::typelist::create2<Eq_Fn, Update_Policy>::type, Allocator>
// A list-update based associative container. /// A list-update based associative container.
template<typename Key, template<typename Key,
typename Mapped, typename Mapped,
class Eq_Fn = typename detail::default_eq_fn<Key>::type, class Eq_Fn = typename detail::default_eq_fn<Key>::type,
...@@ -678,6 +693,7 @@ namespace __gnu_pbds ...@@ -678,6 +693,7 @@ namespace __gnu_pbds
#undef PB_DS_BASE_C_DEC #undef PB_DS_BASE_C_DEC
// @} group pbds
} // namespace __gnu_pbds } // namespace __gnu_pbds
#endif #endif
// File descriptor layer for filebuf -*- C++ -*- // File descriptor layer for filebuf -*- C++ -*-
// Copyright (C) 2002, 2003, 2004, 2005, 2009 Free Software Foundation, Inc. // Copyright (C) 2002, 2003, 2004, 2005, 2009, 2010
// Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the // software; you can redistribute it and/or modify it under the
...@@ -37,6 +38,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -37,6 +38,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
/** /**
* @brief Provides a layer of compatibility for C/POSIX. * @brief Provides a layer of compatibility for C/POSIX.
* @ingroup io
* *
* This GNU extension provides extensions for working with standard C * This GNU extension provides extensions for working with standard C
* FILE*'s and POSIX file descriptors. It must be instantiated by the * FILE*'s and POSIX file descriptors. It must be instantiated by the
......
...@@ -43,7 +43,14 @@ ...@@ -43,7 +43,14 @@
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
/// class stdio_sync_filebuf. /**
* @brief Provides a layer of compatibility for C.
* @ingroup io
*
* This GNU extension provides extensions for working with standard
* C FILE*'s. It must be instantiated by the user with the type of
* character used in the file stream, e.g., stdio_filebuf<char>.
*/
template<typename _CharT, typename _Traits = std::char_traits<_CharT> > template<typename _CharT, typename _Traits = std::char_traits<_CharT> >
class stdio_sync_filebuf : public std::basic_streambuf<_CharT, _Traits> class stdio_sync_filebuf : public std::basic_streambuf<_CharT, _Traits>
{ {
......
...@@ -41,10 +41,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) ...@@ -41,10 +41,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
/** /**
* @class __versa_string vstring.h * @class __versa_string vstring.h
* @brief Managing sequences of characters and character-like objects. * @brief Template class __versa_string.
* @ingroup extensions
*
* Data structure managing sequences of characters and
* character-like objects.
*/ */
// Template class __versa_string
template<typename _CharT, typename _Traits, typename _Alloc, template<typename _CharT, typename _Traits, typename _Alloc,
template <typename, typename, typename> class _Base> template <typename, typename, typename> class _Base>
class __versa_string class __versa_string
......
...@@ -90,9 +90,6 @@ namespace std ...@@ -90,9 +90,6 @@ namespace std
_Has_result_type_helper<typename remove_cv<_Tp>::type>::value> _Has_result_type_helper<typename remove_cv<_Tp>::type>::value>
{ }; { };
/**
*
*/
/// If we have found a result_type, extract it. /// If we have found a result_type, extract it.
template<bool _Has_result_type, typename _Functor> template<bool _Has_result_type, typename _Functor>
struct _Maybe_get_result_type struct _Maybe_get_result_type
...@@ -385,7 +382,11 @@ namespace std ...@@ -385,7 +382,11 @@ namespace std
: binary_function<const volatile _T1*, _T2, _Res> : binary_function<const volatile _T1*, _T2, _Res>
{ }; { };
/// reference_wrapper /**
* @brief Primary class template for reference_wrapper.
* @ingroup functors
* @{
*/
template<typename _Tp> template<typename _Tp>
class reference_wrapper class reference_wrapper
: public _Reference_wrapper_base<typename remove_cv<_Tp>::type> : public _Reference_wrapper_base<typename remove_cv<_Tp>::type>
...@@ -431,28 +432,32 @@ namespace std ...@@ -431,28 +432,32 @@ namespace std
}; };
// Denotes a reference should be taken to a variable. /// Denotes a reference should be taken to a variable.
template<typename _Tp> template<typename _Tp>
inline reference_wrapper<_Tp> inline reference_wrapper<_Tp>
ref(_Tp& __t) ref(_Tp& __t)
{ return reference_wrapper<_Tp>(__t); } { return reference_wrapper<_Tp>(__t); }
// Denotes a const reference should be taken to a variable. /// Denotes a const reference should be taken to a variable.
template<typename _Tp> template<typename _Tp>
inline reference_wrapper<const _Tp> inline reference_wrapper<const _Tp>
cref(const _Tp& __t) cref(const _Tp& __t)
{ return reference_wrapper<const _Tp>(__t); } { return reference_wrapper<const _Tp>(__t); }
/// Partial specialization.
template<typename _Tp> template<typename _Tp>
inline reference_wrapper<_Tp> inline reference_wrapper<_Tp>
ref(reference_wrapper<_Tp> __t) ref(reference_wrapper<_Tp> __t)
{ return ref(__t.get()); } { return ref(__t.get()); }
/// Partial specialization.
template<typename _Tp> template<typename _Tp>
inline reference_wrapper<const _Tp> inline reference_wrapper<const _Tp>
cref(reference_wrapper<_Tp> __t) cref(reference_wrapper<_Tp> __t)
{ return cref(__t.get()); } { return cref(__t.get()); }
// @} group functors
template<typename _Tp, bool> template<typename _Tp, bool>
struct _Mem_fn_const_or_non struct _Mem_fn_const_or_non
{ {
...@@ -753,6 +758,7 @@ namespace std ...@@ -753,6 +758,7 @@ namespace std
/** /**
* @brief Returns a function object that forwards to the member * @brief Returns a function object that forwards to the member
* pointer @a pm. * pointer @a pm.
* @ingroup functors
*/ */
template<typename _Tp, typename _Class> template<typename _Tp, typename _Class>
inline _Mem_fn<_Tp _Class::*> inline _Mem_fn<_Tp _Class::*>
...@@ -765,6 +771,7 @@ namespace std ...@@ -765,6 +771,7 @@ namespace std
* @brief Determines if the given type _Tp is a function object * @brief Determines if the given type _Tp is a function object
* should be treated as a subexpression when evaluating calls to * should be treated as a subexpression when evaluating calls to
* function objects returned by bind(). [TR1 3.6.1] * function objects returned by bind(). [TR1 3.6.1]
* @ingroup binders
*/ */
template<typename _Tp> template<typename _Tp>
struct is_bind_expression struct is_bind_expression
...@@ -773,6 +780,7 @@ namespace std ...@@ -773,6 +780,7 @@ namespace std
/** /**
* @brief Determines if the given type _Tp is a placeholder in a * @brief Determines if the given type _Tp is a placeholder in a
* bind() expression and, if so, which placeholder it is. [TR1 3.6.2] * bind() expression and, if so, which placeholder it is. [TR1 3.6.2]
* @ingroup binders
*/ */
template<typename _Tp> template<typename _Tp>
struct is_placeholder struct is_placeholder
...@@ -784,6 +792,7 @@ namespace std ...@@ -784,6 +792,7 @@ namespace std
/** @namespace std::placeholders /** @namespace std::placeholders
* @brief ISO C++ 0x entities sub namespace for functional. * @brief ISO C++ 0x entities sub namespace for functional.
* @ingroup binders
* *
* Define a large number of placeholders. There is no way to * Define a large number of placeholders. There is no way to
* simplify this with variadic templates, because we're introducing * simplify this with variadic templates, because we're introducing
...@@ -828,6 +837,7 @@ namespace std ...@@ -828,6 +837,7 @@ namespace std
/** /**
* Partial specialization of is_placeholder that provides the placeholder * Partial specialization of is_placeholder that provides the placeholder
* number for the placeholder objects defined by libstdc++. * number for the placeholder objects defined by libstdc++.
* @ingroup binders
*/ */
template<int _Num> template<int _Num>
struct is_placeholder<_Placeholder<_Num> > struct is_placeholder<_Placeholder<_Num> >
...@@ -1335,17 +1345,26 @@ namespace std ...@@ -1335,17 +1345,26 @@ namespace std
} }
}; };
/// Class template _Bind is always a bind expression. /**
* @brief Class template _Bind is always a bind expression.
* @ingroup binders
*/
template<typename _Signature> template<typename _Signature>
struct is_bind_expression<_Bind<_Signature> > struct is_bind_expression<_Bind<_Signature> >
: public true_type { }; : public true_type { };
/// Class template _Bind_result is always a bind expression. /**
* @brief Class template _Bind is always a bind expression.
* @ingroup binders
*/
template<typename _Result, typename _Signature> template<typename _Result, typename _Signature>
struct is_bind_expression<_Bind_result<_Result, _Signature> > struct is_bind_expression<_Bind_result<_Result, _Signature> >
: public true_type { }; : public true_type { };
/// bind /**
* @brief Function template for std::bind.
* @ingroup binders
*/
template<typename _Functor, typename... _ArgTypes> template<typename _Functor, typename... _ArgTypes>
inline inline
_Bind<typename _Maybe_wrap_member_pointer<_Functor>::type(_ArgTypes...)> _Bind<typename _Maybe_wrap_member_pointer<_Functor>::type(_ArgTypes...)>
...@@ -1358,6 +1377,10 @@ namespace std ...@@ -1358,6 +1377,10 @@ namespace std
std::forward<_ArgTypes>(__args)...); std::forward<_ArgTypes>(__args)...);
} }
/**
* @brief Function template for std::bind.
* @ingroup binders
*/
template<typename _Result, typename _Functor, typename... _ArgTypes> template<typename _Result, typename _Functor, typename... _ArgTypes>
inline inline
_Bind_result<_Result, _Bind_result<_Result,
...@@ -1766,7 +1789,12 @@ namespace std ...@@ -1766,7 +1789,12 @@ namespace std
} }
}; };
/// class function /**
* @brief Primary class template for std::function.
* @ingroup functors
*
* Polymorphic function wrapper.
*/
template<typename _Res, typename... _ArgTypes> template<typename _Res, typename... _ArgTypes>
class function<_Res(_ArgTypes...)> class function<_Res(_ArgTypes...)>
: public _Maybe_unary_or_binary_function<_Res, _ArgTypes...>, : public _Maybe_unary_or_binary_function<_Res, _ArgTypes...>,
...@@ -2033,6 +2061,7 @@ namespace std ...@@ -2033,6 +2061,7 @@ namespace std
_Invoker_type _M_invoker; _Invoker_type _M_invoker;
}; };
// Out-of-line member definitions.
template<typename _Res, typename... _ArgTypes> template<typename _Res, typename... _ArgTypes>
function<_Res(_ArgTypes...)>:: function<_Res(_ArgTypes...)>::
function(const function& __x) function(const function& __x)
......
...@@ -52,6 +52,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -52,6 +52,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
/** /**
* @brief The actual work of input and output (interface). * @brief The actual work of input and output (interface).
* @ingroup io
* *
* This is a base class. Derived stream buffers each control a * This is a base class. Derived stream buffers each control a
* pair of character sequences: one for input, and one for output. * pair of character sequences: one for input, and one for output.
......
// { dg-do compile } // { dg-do compile }
// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software // Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
// Foundation, Inc. // Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
...@@ -34,5 +34,5 @@ void test01() ...@@ -34,5 +34,5 @@ void test01()
} }
// { dg-error "synthesized" "" { target *-*-* } 33 } // { dg-error "synthesized" "" { target *-*-* } 33 }
// { dg-error "within this context" "" { target *-*-* } 26 } // { dg-error "within this context" "" { target *-*-* } 26 }
// { dg-error "is private" "" { target *-*-* } 793 } // { dg-error "is private" "" { target *-*-* } 788 }
// { dg-error "operator=" "" { target *-*-* } 0 } // { dg-error "operator=" "" { target *-*-* } 0 }
...@@ -34,5 +34,5 @@ void test02() ...@@ -34,5 +34,5 @@ void test02()
} }
// { dg-error "within this context" "" { target *-*-* } 27 } // { dg-error "within this context" "" { target *-*-* } 27 }
// { dg-error "synthesized" "" { target *-*-* } 33 } // { dg-error "synthesized" "" { target *-*-* } 33 }
// { dg-error "is private" "" { target *-*-* } 790 } // { dg-error "is private" "" { target *-*-* } 785 }
// { dg-error "copy constructor" "" { target *-*-* } 0 } // { dg-error "copy constructor" "" { target *-*-* } 0 }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment