+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>
PR libstdc++/42460
// Locale support (codecvt) -*- C++ -*-
// 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
// software; you can redistribute it and/or modify it under the
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
: public __codecvt_abstract_base<_InternT, _ExternT, _StateT>
{
// 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
// software; you can redistribute it and/or modify it under the
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>
struct hash;
{ return reinterpret_cast<size_t>(__p); }
};
- /// Explicit specializations for integer types.
+ // Explicit specializations for integer types.
#define _Cxx_hashtable_define_trivial_hash(_Tp) \
template<> \
struct hash<_Tp> : public std::unary_function<_Tp, size_t> \
{ return static_cast<size_t>(__val); } \
};
+ /// Explicit specialization for bool.
_Cxx_hashtable_define_trivial_hash(bool);
+
+ /// Explicit specialization for char.
_Cxx_hashtable_define_trivial_hash(char);
+
+ /// Explicit specialization for signed char.
_Cxx_hashtable_define_trivial_hash(signed char);
+
+ /// Explicit specialization for unsigned char.
_Cxx_hashtable_define_trivial_hash(unsigned char);
+
+ /// Explicit specialization for wchar_t.
_Cxx_hashtable_define_trivial_hash(wchar_t);
+
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
+ /// Explicit specialization for char16_t.
_Cxx_hashtable_define_trivial_hash(char16_t);
+
+ /// Explicit specialization for char32_t.
_Cxx_hashtable_define_trivial_hash(char32_t);
#endif
+
+ /// Explicit specialization for short.
_Cxx_hashtable_define_trivial_hash(short);
+
+ /// Explicit specialization for int.
_Cxx_hashtable_define_trivial_hash(int);
+
+ /// Explicit specialization for long.
_Cxx_hashtable_define_trivial_hash(long);
+
+ /// Explicit specialization for long long.
_Cxx_hashtable_define_trivial_hash(long long);
+
+ /// Explicit specialization for unsigned short.
_Cxx_hashtable_define_trivial_hash(unsigned short);
+
+ /// Explicit specialization for unsigned int.
_Cxx_hashtable_define_trivial_hash(unsigned int);
+
+ /// Explicit specialization for unsigned long.
_Cxx_hashtable_define_trivial_hash(unsigned long);
+
+ /// Explicit specialization for unsigned long long.
_Cxx_hashtable_define_trivial_hash(unsigned long long);
#undef _Cxx_hashtable_define_trivial_hash
// Fowler / Noll / Vo (FNV) Hash (type FNV-1a)
// (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)>
struct _Fnv_hash
{
}
};
+ /// Explicit specializations for string.
template<>
struct hash<string>
: public std::unary_function<string, size_t>
};
#ifdef _GLIBCXX_USE_WCHAR_T
+ /// Explicit specializations for wstring.
template<>
struct hash<wstring>
: public std::unary_function<wstring, size_t>
#endif
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
+ /// Explicit specializations for u16string.
template<>
struct hash<u16string>
: public std::unary_function<u16string, size_t>
}
};
+ /// Explicit specializations for u32string.
template<>
struct hash<u32string>
: public std::unary_function<u32string, size_t>
};
#endif
+ /// Explicit specializations for error_code.
template<>
struct hash<error_code>
: public std::unary_function<error_code, size_t>
return _Fnv_hash<>::hash(__p, sizeof(__e));
}
};
+ // @} group hashes
}
#endif // _FUNCTIONAL_HASH_H
register_callback(event_callback __fn, int __index);
protected:
- //@{
- /**
- * ios_base data members (doc me)
- */
streamsize _M_precision;
streamsize _M_width;
fmtflags _M_flags;
iostate _M_exception;
iostate _M_streambuf_state;
- //@}
// 27.4.2.6 Members for callbacks
// 27.4.2.6 ios_base callbacks
// 22.1.1 Class locale
/**
* @brief Container class for localization functionality.
+ * @ingroup locales
*
* 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
// 22.1.1.1.2 Class locale::facet
/**
* @brief Localization functionality base class.
+ * @ingroup locales
*
* The facet class is the base class for a localization feature, such as
* money, time, and number printing. It provides common support for facets
// 22.1.1.1.3 Class locale::id
/**
* @brief Facet ID class.
+ * @ingroup locales
*
* 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
// 22.2.1.1 Template class ctype
// Include host and configuration specific ctype enums for ctype_base.
- // Common base for ctype<_CharT>.
/**
* @brief Common base for ctype facet
*
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
* character sets. It wraps <cctype> functionality. Ctype gets used by
template<typename _CharT>
locale::id ctype<_CharT>::id;
- // 22.2.1.3 ctype<char> specialization.
/**
* @brief The ctype<char> specialization.
+ * @ingroup locales
*
* This class defines classification and conversion functions for
* the char type. It gets used by char streams for many I/O
};
#ifdef _GLIBCXX_USE_WCHAR_T
- // 22.2.1.3 ctype<wchar_t> specialization
/**
* @brief The ctype<wchar_t> specialization.
+ * @ingroup locales
*
* This class defines classification and conversion functions for the
* wchar_t type. It gets used by wchar_t streams for many I/O operations.
}
/**
- * @brief Numpunct facet.
+ * @brief Primary class template numpunct.
+ * @ingroup locales
*
* This facet stores several pieces of information related to printing and
* scanning numbers, such as the decimal point character. It takes a
_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
* from a string. It is used by the istream numeric extraction
/**
- * @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
* used by the ostream numeric insertion operators.
/**
* @brief Time format ordering data.
+ * @ingroup locales
*
- * This class provides an enum representing different orderings of day,
- * month, and year.
+ * This class provides an enum representing different orderings of
+ * time: day, month, and year.
*/
class time_base
{
_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
* time from a string. It is used by the istream numeric
};
/**
- * @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
* according to formats used by strftime().
/**
* @brief Money format ordering data.
+ * @ingroup locales
*
* This class contains an ordered array of 4 fields to represent the
* pattern for formatting a money amount. Each field may contain one entry
}
/**
- * @brief Facet for formatting data for money amounts.
+ * @brief Primary class template moneypunct.
+ * @ingroup locales
*
* This facet encapsulates the punctuation, grouping and other formatting
* features of money amount string representations.
_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
* amount from a string.
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
* amount.
/**
* @brief Messages facet base class providing catalog typedef.
+ * @ingroup locales
*/
struct messages_base
{
};
/**
- * @brief Facet for handling message catalogs
+ * @brief Primary class template messages.
+ * @ingroup locales
*
* This facet encapsulates the code to retrieve messages from
* message catalogs. The only thing defined by the standard for this facet
template<typename _CharT>
locale::id messages<_CharT>::id;
- // Specializations for required instantiations.
+ /// Specializations for required instantiations.
template<>
string
messages<char>::do_get(catalog, int, int, const string&) const;
// Locale support -*- C++ -*-
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-// 2006, 2007, 2009
+// 2006, 2007, 2009, 2010
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
_GLIBCXX_BEGIN_NAMESPACE(std)
+ /**
+ * @defgroup locales Locales
+ *
+ * Classes and functions for internationalization and localization.
+ */
+
// 22.1.1 Locale
class locale;
// -*- 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
// software; you can redistribute it and/or modify it under the terms
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 \
detail::container_base_dispatch<Key, Mapped, Tag, Policy_Tl, Allocator>::type
- // An abstract basic associative container.
+ /// An abstract basic associative container.
template<typename Key,
typename Mapped,
typename Tag,
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>
- // An abstract basic hash-based associative container.
+ /// An abstract basic hash-based associative container.
template<typename Key,
typename Mapped,
typename Hash_Fn,
cc_hash_tag, \
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,
typename Mapped,
typename Hash_Fn = typename detail::default_hash_fn<Key>::type,
gp_hash_tag, \
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,
typename Mapped,
typename Hash_Fn = typename detail::default_hash_fn<Key>::type,
#define PB_DS_BASE_C_DEC \
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,
typename Node_Update, typename Policy_Tl, typename Allocator>
class basic_tree : public PB_DS_BASE_C_DEC
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>
- // 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>,
typename Tag = rb_tree_tag,
template<typename Const_Node_Iterator, typename Node_Iterator, typename Cmp_Fn_, typename Allocator_>
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>
- // A concrete basic trie-based associative container.
+ /// A concrete basic trie-based associative container.
template<typename Key,
typename Mapped,
typename E_Access_Traits = typename detail::default_trie_e_access_traits<Key>::type,
container_base<Key, Mapped, list_update_tag, \
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,
typename Mapped,
class Eq_Fn = typename detail::default_eq_fn<Key>::type,
#undef PB_DS_BASE_C_DEC
+ // @} group pbds
} // namespace __gnu_pbds
#endif
// 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
// software; you can redistribute it and/or modify it under the
/**
* @brief Provides a layer of compatibility for C/POSIX.
+ * @ingroup io
*
* This GNU extension provides extensions for working with standard C
* FILE*'s and POSIX file descriptors. It must be instantiated by the
_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> >
class stdio_sync_filebuf : public std::basic_streambuf<_CharT, _Traits>
{
/**
* @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, typename, typename> class _Base>
class __versa_string
_Has_result_type_helper<typename remove_cv<_Tp>::type>::value>
{ };
- /**
- *
- */
/// If we have found a result_type, extract it.
template<bool _Has_result_type, typename _Functor>
struct _Maybe_get_result_type
: binary_function<const volatile _T1*, _T2, _Res>
{ };
- /// reference_wrapper
+ /**
+ * @brief Primary class template for reference_wrapper.
+ * @ingroup functors
+ * @{
+ */
template<typename _Tp>
class reference_wrapper
: public _Reference_wrapper_base<typename remove_cv<_Tp>::type>
};
- // Denotes a reference should be taken to a variable.
+ /// Denotes a reference should be taken to a variable.
template<typename _Tp>
inline reference_wrapper<_Tp>
ref(_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>
inline reference_wrapper<const _Tp>
cref(const _Tp& __t)
{ return reference_wrapper<const _Tp>(__t); }
+ /// Partial specialization.
template<typename _Tp>
inline reference_wrapper<_Tp>
ref(reference_wrapper<_Tp> __t)
{ return ref(__t.get()); }
+ /// Partial specialization.
template<typename _Tp>
inline reference_wrapper<const _Tp>
cref(reference_wrapper<_Tp> __t)
{ return cref(__t.get()); }
+ // @} group functors
+
template<typename _Tp, bool>
struct _Mem_fn_const_or_non
{
/**
* @brief Returns a function object that forwards to the member
* pointer @a pm.
+ * @ingroup functors
*/
template<typename _Tp, typename _Class>
inline _Mem_fn<_Tp _Class::*>
* @brief Determines if the given type _Tp is a function object
* should be treated as a subexpression when evaluating calls to
* function objects returned by bind(). [TR1 3.6.1]
+ * @ingroup binders
*/
template<typename _Tp>
struct is_bind_expression
/**
* @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]
+ * @ingroup binders
*/
template<typename _Tp>
struct is_placeholder
/** @namespace std::placeholders
* @brief ISO C++ 0x entities sub namespace for functional.
+ * @ingroup binders
*
* Define a large number of placeholders. There is no way to
* simplify this with variadic templates, because we're introducing
/**
* Partial specialization of is_placeholder that provides the placeholder
* number for the placeholder objects defined by libstdc++.
+ * @ingroup binders
*/
template<int _Num>
struct is_placeholder<_Placeholder<_Num> >
}
};
- /// Class template _Bind is always a bind expression.
+ /**
+ * @brief Class template _Bind is always a bind expression.
+ * @ingroup binders
+ */
template<typename _Signature>
struct is_bind_expression<_Bind<_Signature> >
: 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>
struct is_bind_expression<_Bind_result<_Result, _Signature> >
: public true_type { };
- /// bind
+ /**
+ * @brief Function template for std::bind.
+ * @ingroup binders
+ */
template<typename _Functor, typename... _ArgTypes>
inline
_Bind<typename _Maybe_wrap_member_pointer<_Functor>::type(_ArgTypes...)>
std::forward<_ArgTypes>(__args)...);
}
+ /**
+ * @brief Function template for std::bind.
+ * @ingroup binders
+ */
template<typename _Result, typename _Functor, typename... _ArgTypes>
inline
_Bind_result<_Result,
}
};
- /// class function
+ /**
+ * @brief Primary class template for std::function.
+ * @ingroup functors
+ *
+ * Polymorphic function wrapper.
+ */
template<typename _Res, typename... _ArgTypes>
class function<_Res(_ArgTypes...)>
: public _Maybe_unary_or_binary_function<_Res, _ArgTypes...>,
_Invoker_type _M_invoker;
};
+ // Out-of-line member definitions.
template<typename _Res, typename... _ArgTypes>
function<_Res(_ArgTypes...)>::
function(const function& __x)
/**
* @brief The actual work of input and output (interface).
+ * @ingroup io
*
* This is a base class. Derived stream buffers each control a
* pair of character sequences: one for input, and one for output.
// { 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.
//
// This file is part of the GNU ISO C++ Library. This library is free
}
// { dg-error "synthesized" "" { target *-*-* } 33 }
// { 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 "within this context" "" { target *-*-* } 27 }
// { dg-error "synthesized" "" { target *-*-* } 33 }
-// { dg-error "is private" "" { target *-*-* } 790 }
+// { dg-error "is private" "" { target *-*-* } 785 }
// { dg-error "copy constructor" "" { target *-*-* } 0 }