doxygroups.cc: Add markup for namespace tr2.
2011-11-03 Benjamin Kosnik <bkoz@redhat.com> * doc/doxygen/doxygroups.cc: Add markup for namespace tr2. * include/tr2/bool_set: Adjust doxygen markup. * include/tr2/dynamic_bitset: Same. * include/tr2/type_traits: Same. From-SVN: r180874
This commit is contained in:
parent
1838afec3e
commit
c3b0bfe175
|
@ -1,3 +1,10 @@
|
||||||
|
2011-11-03 Benjamin Kosnik <bkoz@redhat.com>
|
||||||
|
|
||||||
|
* doc/doxygen/doxygroups.cc: Add markup for namespace tr2.
|
||||||
|
* include/tr2/bool_set: Adjust doxygen markup.
|
||||||
|
* include/tr2/dynamic_bitset: Same.
|
||||||
|
* include/tr2/type_traits: Same.
|
||||||
|
|
||||||
2011-11-03 Benjamin Kosnik <bkoz@redhat.com>
|
2011-11-03 Benjamin Kosnik <bkoz@redhat.com>
|
||||||
|
|
||||||
* doc/html/*: Regenerate.
|
* doc/html/*: Regenerate.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright (C) 2001, 2002, 2005, 2008, 2009, 2010
|
Copyright (C) 2001, 2002, 2005, 2008, 2009, 2010, 2011
|
||||||
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
||||||
See license.html for license.
|
See license.html for license.
|
||||||
|
|
||||||
|
@ -29,6 +29,12 @@
|
||||||
/** @namespace std::tr1::__detail
|
/** @namespace std::tr1::__detail
|
||||||
* @brief Implementation details not part of the namespace std::tr1 interface.
|
* @brief Implementation details not part of the namespace std::tr1 interface.
|
||||||
*/
|
*/
|
||||||
|
/** @namespace std::tr2
|
||||||
|
* @brief ISO C++ TR2 entities toplevel namespace is std::tr2.
|
||||||
|
*/
|
||||||
|
/** @namespace std::tr2::__detail
|
||||||
|
* @brief Implementation details not part of the namespace std::tr2 interface.
|
||||||
|
*/
|
||||||
/** @namespace __gnu_cxx
|
/** @namespace __gnu_cxx
|
||||||
* @brief GNU extensions for public use.
|
* @brief GNU extensions for public use.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -26,16 +26,6 @@
|
||||||
* This is a TR2 C++ Library header.
|
* This is a TR2 C++ Library header.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//
|
|
||||||
// Sort of an implementation of bool_set in n2136 Hervé Brönnimann,
|
|
||||||
// Guillaume Melquiond, Sylvain Pion.
|
|
||||||
//
|
|
||||||
// The implicit conversion to bool is slippery! I may use the new
|
|
||||||
// explicit conversion. This has been specialized in the language so
|
|
||||||
// that in contexts requiring a bool the conversion happens
|
|
||||||
// implicitly. Thus most objections should be eliminated.
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifndef _GLIBCXX_TR2_BOOL_SET
|
#ifndef _GLIBCXX_TR2_BOOL_SET
|
||||||
#define _GLIBCXX_TR2_BOOL_SET 1
|
#define _GLIBCXX_TR2_BOOL_SET 1
|
||||||
|
|
||||||
|
@ -50,6 +40,17 @@ namespace tr2
|
||||||
{
|
{
|
||||||
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
|
|
||||||
|
/**
|
||||||
|
* bool_set
|
||||||
|
*
|
||||||
|
* See N2136, Bool_set: multi-valued logic
|
||||||
|
* by Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion.
|
||||||
|
*
|
||||||
|
* The implicit conversion to bool is slippery! I may use the new
|
||||||
|
* explicit conversion. This has been specialized in the language
|
||||||
|
* so that in contexts requiring a bool the conversion happens
|
||||||
|
* implicitly. Thus most objections should be eliminated.
|
||||||
|
*/
|
||||||
class bool_set
|
class bool_set
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -60,7 +61,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
/// Constructor from bool.
|
/// Constructor from bool.
|
||||||
bool_set(bool __t) : _M_b(_Bool_set_val(__t)) { }
|
bool_set(bool __t) : _M_b(_Bool_set_val(__t)) { }
|
||||||
|
|
||||||
///
|
|
||||||
// I'm not sure about this.
|
// I'm not sure about this.
|
||||||
bool contains(bool_set __b) const
|
bool contains(bool_set __b) const
|
||||||
{ return this->is_singleton() && this->equals(__b); }
|
{ return this->is_singleton() && this->equals(__b); }
|
||||||
|
|
|
@ -120,11 +120,11 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_M_assign(const __dynamic_bitset_base<block_type, allocator_type>& __b)
|
_M_assign(const __dynamic_bitset_base& __b)
|
||||||
{ this->_M_w = __b._M_w; }
|
{ this->_M_w = __b._M_w; }
|
||||||
|
|
||||||
void
|
void
|
||||||
_M_swap(__dynamic_bitset_base<block_type, allocator_type>& __b)
|
_M_swap(__dynamic_bitset_base& __b)
|
||||||
{ this->_M_w.swap(__b._M_w); }
|
{ this->_M_w.swap(__b._M_w); }
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -178,7 +178,7 @@ public:
|
||||||
{ return this->_M_w[_M_w.size() - 1]; }
|
{ return this->_M_w[_M_w.size() - 1]; }
|
||||||
|
|
||||||
void
|
void
|
||||||
_M_do_and(const __dynamic_bitset_base<block_type, allocator_type>& __x)
|
_M_do_and(const __dynamic_bitset_base& __x)
|
||||||
{
|
{
|
||||||
if (__x._M_w.size() == this->_M_w.size())
|
if (__x._M_w.size() == this->_M_w.size())
|
||||||
for (size_t __i = 0; __i < this->_M_w.size(); ++__i)
|
for (size_t __i = 0; __i < this->_M_w.size(); ++__i)
|
||||||
|
@ -188,7 +188,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_M_do_or(const __dynamic_bitset_base<block_type, allocator_type>& __x)
|
_M_do_or(const __dynamic_bitset_base& __x)
|
||||||
{
|
{
|
||||||
if (__x._M_w.size() == this->_M_w.size())
|
if (__x._M_w.size() == this->_M_w.size())
|
||||||
for (size_t __i = 0; __i < this->_M_w.size(); ++__i)
|
for (size_t __i = 0; __i < this->_M_w.size(); ++__i)
|
||||||
|
@ -198,7 +198,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_M_do_xor(const __dynamic_bitset_base<block_type, allocator_type>& __x)
|
_M_do_xor(const __dynamic_bitset_base& __x)
|
||||||
{
|
{
|
||||||
if (__x._M_w.size() == this->_M_w.size())
|
if (__x._M_w.size() == this->_M_w.size())
|
||||||
for (size_t __i = 0; __i < this->_M_w.size(); ++__i)
|
for (size_t __i = 0; __i < this->_M_w.size(); ++__i)
|
||||||
|
@ -208,7 +208,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_M_do_dif(const __dynamic_bitset_base<block_type, allocator_type>& __x)
|
_M_do_dif(const __dynamic_bitset_base& __x)
|
||||||
{
|
{
|
||||||
if (__x._M_w.size() == this->_M_w.size())
|
if (__x._M_w.size() == this->_M_w.size())
|
||||||
for (size_t __i = 0; __i < this->_M_w.size(); ++__i)
|
for (size_t __i = 0; __i < this->_M_w.size(); ++__i)
|
||||||
|
@ -245,7 +245,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
_M_is_equal(const __dynamic_bitset_base<block_type, allocator_type>& __x) const
|
_M_is_equal(const __dynamic_bitset_base& __x) const
|
||||||
{
|
{
|
||||||
if (__x.size() == this->size())
|
if (__x.size() == this->size())
|
||||||
{
|
{
|
||||||
|
@ -259,7 +259,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
_M_is_less(const __dynamic_bitset_base<block_type, allocator_type>& __x) const
|
_M_is_less(const __dynamic_bitset_base& __x) const
|
||||||
{
|
{
|
||||||
if (__x.size() == this->size())
|
if (__x.size() == this->size())
|
||||||
{
|
{
|
||||||
|
@ -296,7 +296,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
_M_is_subset_of(const __dynamic_bitset_base<block_type, allocator_type>& __b)
|
_M_is_subset_of(const __dynamic_bitset_base& __b)
|
||||||
{
|
{
|
||||||
if (__b.size() == this->size())
|
if (__b.size() == this->size())
|
||||||
{
|
{
|
||||||
|
@ -310,7 +310,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
_M_is_proper_subset_of(const __dynamic_bitset_base<block_type, allocator_type>& __b) const
|
_M_is_proper_subset_of(const __dynamic_bitset_base& __b) const
|
||||||
{
|
{
|
||||||
if (this->is_subset_of(__b))
|
if (this->is_subset_of(__b))
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,19 +43,28 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
* @defgroup metaprogramming Type Traits
|
* @defgroup metaprogramming Type Traits
|
||||||
* @ingroup utilities
|
* @ingroup utilities
|
||||||
*
|
*
|
||||||
* Compile time type transformation and information.
|
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See N2965: Type traits and base classes
|
||||||
|
* by Michael Spertus
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Simple typelist. Compile-time list of types.
|
||||||
|
*/
|
||||||
template<typename... _Elements>
|
template<typename... _Elements>
|
||||||
struct typelist;
|
struct typelist;
|
||||||
|
|
||||||
|
/// Specialization for an empty typelist.
|
||||||
template<>
|
template<>
|
||||||
struct typelist<>
|
struct typelist<>
|
||||||
{
|
{
|
||||||
typedef std::true_type empty;
|
typedef std::true_type empty;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/// Partial specialization.
|
||||||
template<typename _First, typename... _Rest>
|
template<typename _First, typename... _Rest>
|
||||||
struct typelist<_First, _Rest...>
|
struct typelist<_First, _Rest...>
|
||||||
{
|
{
|
||||||
|
@ -72,23 +81,30 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
// Sequence abstraction metafunctions default to looking in the type
|
/// Sequence abstraction metafunctions for manipulating a typelist.
|
||||||
|
|
||||||
|
|
||||||
|
/// Return the first type in a typelist.
|
||||||
template<typename _Tp>
|
template<typename _Tp>
|
||||||
struct first : public _Tp::first { };
|
struct first : public _Tp::first { };
|
||||||
|
|
||||||
|
/// Return the typelist minus the first type.
|
||||||
template<typename _Tp>
|
template<typename _Tp>
|
||||||
struct rest : public _Tp::rest { };
|
struct rest : public _Tp::rest { };
|
||||||
|
|
||||||
|
/// Query to see if a typelist is empty.
|
||||||
template<typename _Tp>
|
template<typename _Tp>
|
||||||
struct empty : public _Tp::empty { };
|
struct empty : public _Tp::empty { };
|
||||||
|
|
||||||
|
|
||||||
|
/// Enumerate all the base classes of a class. Form of a typelist.
|
||||||
template<typename _Tp>
|
template<typename _Tp>
|
||||||
struct bases
|
struct bases
|
||||||
{
|
{
|
||||||
typedef typelist<__bases(_Tp)...> type;
|
typedef typelist<__bases(_Tp)...> type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/// Enumerate all the direct base classes of a class. Form of a typelist.
|
||||||
template<typename _Tp>
|
template<typename _Tp>
|
||||||
struct direct_bases
|
struct direct_bases
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue