mirror of git://gcc.gnu.org/git/gcc.git
any (any_cast): Combine duplicate doxygen comments.
* include/experimental/any (any_cast): Combine duplicate doxygen comments. * include/experimental/string_view (basic_string_view): Update doxygen comment. * include/std/bitset (bitset): Move to Doxygen 'utilities' group. * include/tr2/dynamic_bitset (_Bool2UChar): Remove unused templates. (dynamic_bitset): Improve Doxygen comments. * include/tr2/dynamic_bitset.tcc (operator>>): Improve Doxygen comment. From-SVN: r211672
This commit is contained in:
parent
10d43d2fb4
commit
fb3bc97798
|
|
@ -49,6 +49,16 @@
|
||||||
* include/std/streambuf: Likewise.
|
* include/std/streambuf: Likewise.
|
||||||
* doc/html/*: Regenerate.
|
* doc/html/*: Regenerate.
|
||||||
|
|
||||||
|
* include/experimental/any (any_cast): Combine duplicate doxygen
|
||||||
|
comments.
|
||||||
|
* include/experimental/string_view (basic_string_view): Update
|
||||||
|
doxygen comment.
|
||||||
|
* include/std/bitset (bitset): Move to Doxygen 'utilities' group.
|
||||||
|
* include/tr2/dynamic_bitset (_Bool2UChar): Remove unused templates.
|
||||||
|
(dynamic_bitset): Improve Doxygen comments.
|
||||||
|
* include/tr2/dynamic_bitset.tcc (operator>>): Improve Doxygen
|
||||||
|
comment.
|
||||||
|
|
||||||
2014-06-11 Maciej W. Rozycki <macro@codesourcery.com>
|
2014-06-11 Maciej W. Rozycki <macro@codesourcery.com>
|
||||||
|
|
||||||
* testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/4402.cc
|
* testsuite/27_io/basic_ostream/inserters_arithmetic/wchar_t/4402.cc
|
||||||
|
|
|
||||||
|
|
@ -81,11 +81,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief A type-safe container of any type.
|
* @brief A type-safe container of any type.
|
||||||
*
|
*
|
||||||
* An @c any object's state is either empty or it stores a contained object
|
* An @c any object's state is either empty or it stores a contained object
|
||||||
* of CopyConstructible type.
|
* of CopyConstructible type.
|
||||||
*/
|
*/
|
||||||
class any
|
class any
|
||||||
{
|
{
|
||||||
// Holds either pointer to a heap object or the contained object itself.
|
// Holds either pointer to a heap object or the contained object itself.
|
||||||
|
|
@ -391,6 +391,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
* @throw bad_any_cast If <code>
|
* @throw bad_any_cast If <code>
|
||||||
* __any.type() != typeid(remove_reference_t<_ValueType>)
|
* __any.type() != typeid(remove_reference_t<_ValueType>)
|
||||||
* </code>
|
* </code>
|
||||||
|
*
|
||||||
|
* @{
|
||||||
*/
|
*/
|
||||||
template<typename _ValueType>
|
template<typename _ValueType>
|
||||||
inline _ValueType any_cast(any& __any)
|
inline _ValueType any_cast(any& __any)
|
||||||
|
|
@ -403,16 +405,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
__throw_bad_any_cast();
|
__throw_bad_any_cast();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Access the contained object.
|
|
||||||
*
|
|
||||||
* @tparam _ValueType A reference or CopyConstructible type.
|
|
||||||
* @param __any The object to access.
|
|
||||||
* @return The contained object.
|
|
||||||
* @throw bad_any_cast If <code>
|
|
||||||
* __any.type() != typeid(remove_reference_t<_ValueType>)
|
|
||||||
* </code>
|
|
||||||
*/
|
|
||||||
template<typename _ValueType>
|
template<typename _ValueType>
|
||||||
inline _ValueType any_cast(any&& __any)
|
inline _ValueType any_cast(any&& __any)
|
||||||
{
|
{
|
||||||
|
|
@ -423,6 +415,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
return *__p;
|
return *__p;
|
||||||
__throw_bad_any_cast();
|
__throw_bad_any_cast();
|
||||||
}
|
}
|
||||||
|
// @}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Access the contained object.
|
* @brief Access the contained object.
|
||||||
|
|
@ -432,6 +425,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
* @return The address of the contained object if <code>
|
* @return The address of the contained object if <code>
|
||||||
* __any != nullptr && __any.type() == typeid(_ValueType)
|
* __any != nullptr && __any.type() == typeid(_ValueType)
|
||||||
* </code>, otherwise a null pointer.
|
* </code>, otherwise a null pointer.
|
||||||
|
*
|
||||||
|
* @{
|
||||||
*/
|
*/
|
||||||
template<typename _ValueType>
|
template<typename _ValueType>
|
||||||
inline const _ValueType* any_cast(const any* __any) noexcept
|
inline const _ValueType* any_cast(const any* __any) noexcept
|
||||||
|
|
@ -441,15 +436,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Access the contained object.
|
|
||||||
*
|
|
||||||
* @tparam _ValueType The type of the contained object.
|
|
||||||
* @param __any A pointer to the object to access.
|
|
||||||
* @return The address of the contained object if <code>
|
|
||||||
* __any != nullptr && __any.type() == typeid(_ValueType)
|
|
||||||
* </code>, otherwise a null pointer.
|
|
||||||
*/
|
|
||||||
template<typename _ValueType>
|
template<typename _ValueType>
|
||||||
inline _ValueType* any_cast(any* __any) noexcept
|
inline _ValueType* any_cast(any* __any) noexcept
|
||||||
{
|
{
|
||||||
|
|
@ -457,6 +443,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
return static_cast<_ValueType*>(__any_caster<_ValueType>(__any));
|
return static_cast<_ValueType*>(__any_caster<_ValueType>(__any));
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
// @}
|
||||||
|
|
||||||
#ifdef __GXX_RTTI
|
#ifdef __GXX_RTTI
|
||||||
template<typename _Tp, typename _Alloc>
|
template<typename _Tp, typename _Alloc>
|
||||||
|
|
|
||||||
|
|
@ -49,11 +49,12 @@ namespace experimental
|
||||||
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @class basic_string_view <string_view>
|
* @class basic_string_view <experimental/string_view>
|
||||||
* @brief A non-owning reference to a string.
|
* @brief A non-owning reference to a string.
|
||||||
*
|
*
|
||||||
* @ingroup strings
|
* @ingroup strings
|
||||||
* @ingroup sequences
|
* @ingroup sequences
|
||||||
|
* @ingroup experimental
|
||||||
*
|
*
|
||||||
* @tparam _CharT Type of character
|
* @tparam _CharT Type of character
|
||||||
* @tparam _Traits Traits for character type, defaults to
|
* @tparam _Traits Traits for character type, defaults to
|
||||||
|
|
|
||||||
|
|
@ -681,9 +681,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The %bitset class represents a @e fixed-size sequence of bits.
|
* @class bitset <bitset>
|
||||||
*
|
*
|
||||||
* @ingroup containers
|
* @brief The %bitset class represents a @e fixed-size sequence of bits.
|
||||||
|
* @ingroup utilities
|
||||||
*
|
*
|
||||||
* (Note that %bitset does @e not meet the formal requirements of a
|
* (Note that %bitset does @e not meet the formal requirements of a
|
||||||
* <a href="tables.html#65">container</a>. Mainly, it lacks iterators.)
|
* <a href="tables.html#65">container</a>. Mainly, it lacks iterators.)
|
||||||
|
|
|
||||||
|
|
@ -47,28 +47,11 @@ namespace tr2
|
||||||
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dynamic Bitset.
|
* @defgroup dynamic_bitset Dynamic Bitset.
|
||||||
|
* @ingroup extensions
|
||||||
*
|
*
|
||||||
* See N2050,
|
* @{
|
||||||
* Proposal to Add a Dynamically Sizeable Bitset to the Standard Library.
|
|
||||||
*/
|
*/
|
||||||
namespace __detail
|
|
||||||
{
|
|
||||||
|
|
||||||
template<typename T>
|
|
||||||
class _Bool2UChar
|
|
||||||
{
|
|
||||||
typedef T type;
|
|
||||||
};
|
|
||||||
|
|
||||||
template<>
|
|
||||||
class _Bool2UChar<bool>
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
typedef unsigned char type;
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base class, general case.
|
* Base class, general case.
|
||||||
|
|
@ -372,14 +355,8 @@ public:
|
||||||
/**
|
/**
|
||||||
* @brief The %dynamic_bitset class represents a sequence of bits.
|
* @brief The %dynamic_bitset class represents a sequence of bits.
|
||||||
*
|
*
|
||||||
* @ingroup containers
|
* See N2050,
|
||||||
*
|
* Proposal to Add a Dynamically Sizeable Bitset to the Standard Library.
|
||||||
* (Note that %dynamic_bitset does @e not meet the formal
|
|
||||||
* requirements of a <a href="tables.html#65">container</a>.
|
|
||||||
* Mainly, it lacks iterators.)
|
|
||||||
*
|
|
||||||
* The template argument, @a Nb, may be any non-negative number,
|
|
||||||
* specifying the number of bits (e.g., "0", "12", "1024*1024").
|
|
||||||
*
|
*
|
||||||
* In the general unoptimized case, storage is allocated in
|
* In the general unoptimized case, storage is allocated in
|
||||||
* word-sized blocks. Let B be the number of bits in a word, then
|
* word-sized blocks. Let B be the number of bits in a word, then
|
||||||
|
|
@ -409,7 +386,7 @@ public:
|
||||||
* int main()
|
* int main()
|
||||||
* {
|
* {
|
||||||
* long a = 'a';
|
* long a = 'a';
|
||||||
* dynamic_bitset b(a);
|
* dynamic_bitset<> b(a);
|
||||||
*
|
*
|
||||||
* cout << "b('a') is " << b << endl;
|
* cout << "b('a') is " << b << endl;
|
||||||
*
|
*
|
||||||
|
|
@ -421,10 +398,6 @@ public:
|
||||||
* }
|
* }
|
||||||
* @endcode
|
* @endcode
|
||||||
*
|
*
|
||||||
* Also see:
|
|
||||||
* http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt12ch33s02.html
|
|
||||||
* for a description of extensions.
|
|
||||||
*
|
|
||||||
* Most of the actual code isn't contained in %dynamic_bitset<>
|
* Most of the actual code isn't contained in %dynamic_bitset<>
|
||||||
* itself, but in the base class __dynamic_bitset_base. The base
|
* itself, but in the base class __dynamic_bitset_base. The base
|
||||||
* class works with whole words, not with individual bits. This
|
* class works with whole words, not with individual bits. This
|
||||||
|
|
@ -1228,16 +1201,7 @@ public:
|
||||||
}
|
}
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
/**
|
/// Stream output operator for dynamic_bitset.
|
||||||
* @defgroup Global I/O operators for bitsets.
|
|
||||||
* @{
|
|
||||||
* @brief Global I/O operators for bitsets.
|
|
||||||
*
|
|
||||||
* Direct I/O between streams and bitsets is supported. Output is
|
|
||||||
* straightforward. Input will skip whitespace and only accept '0'
|
|
||||||
* and '1' characters. The %dynamic_bitset will grow as necessary
|
|
||||||
* to hold the string of bits.
|
|
||||||
*/
|
|
||||||
template <typename _CharT, typename _Traits,
|
template <typename _CharT, typename _Traits,
|
||||||
typename _WordT, typename _Alloc>
|
typename _WordT, typename _Alloc>
|
||||||
inline std::basic_ostream<_CharT, _Traits>&
|
inline std::basic_ostream<_CharT, _Traits>&
|
||||||
|
|
|
||||||
|
|
@ -195,14 +195,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup Global I/O operators for bitsets.
|
* @brief Stream input operator for dynamic_bitset.
|
||||||
* @{
|
* @ingroup dynamic_bitset
|
||||||
* @brief Global I/O operators for bitsets.
|
|
||||||
*
|
*
|
||||||
* Direct I/O between streams and bitsets is supported. Output is
|
* Input will skip whitespace and only accept '0' and '1' characters.
|
||||||
* straightforward. Input will skip whitespace and only accept '0'
|
* The %dynamic_bitset will grow as necessary to hold the string of bits.
|
||||||
* and '1' characters. The %dynamic_bitset will grow as necessary
|
|
||||||
* to hold the string of bits.
|
|
||||||
*/
|
*/
|
||||||
template<typename _CharT, typename _Traits,
|
template<typename _CharT, typename _Traits,
|
||||||
typename _WordT, typename _Alloc>
|
typename _WordT, typename _Alloc>
|
||||||
|
|
@ -275,9 +272,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
__is.setstate(__state);
|
__is.setstate(__state);
|
||||||
return __is;
|
return __is;
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* @}
|
|
||||||
*/
|
|
||||||
|
|
||||||
_GLIBCXX_END_NAMESPACE_VERSION
|
_GLIBCXX_END_NAMESPACE_VERSION
|
||||||
} // tr2
|
} // tr2
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue