ptr_traits.h (pointer_traits): Fix typos.
2011-06-05 Jonathan Wakely <jwakely.gcc@gmail.com> * include/bits/ptr_traits.h (pointer_traits): Fix typos. * include/ext/pointer.h (pointer_traits): Add partial specialization for _Pointer_adapter. From-SVN: r174661
This commit is contained in:
parent
142f5e4acd
commit
428319bb9a
@ -1,3 +1,9 @@
|
|||||||
|
2011-06-05 Jonathan Wakely <jwakely.gcc@gmail.com>
|
||||||
|
|
||||||
|
* include/bits/ptr_traits.h (pointer_traits): Fix typos.
|
||||||
|
* include/ext/pointer.h (pointer_traits): Add partial specialization
|
||||||
|
for _Pointer_adapter.
|
||||||
|
|
||||||
2011-06-04 Jonathan Wakely <jwakely.gcc@gmail.com>
|
2011-06-04 Jonathan Wakely <jwakely.gcc@gmail.com>
|
||||||
|
|
||||||
* testsuite/util/testsuite_allocator.h (tracker_allocator::construct):
|
* testsuite/util/testsuite_allocator.h (tracker_allocator::construct):
|
||||||
|
@ -106,8 +106,8 @@ _GLIBCXX_HAS_NESTED_TYPE(difference_type)
|
|||||||
|
|
||||||
/* TODO: remove second bool when alias templates are supported */
|
/* TODO: remove second bool when alias templates are supported */
|
||||||
template<typename _Tp, typename _Up,
|
template<typename _Tp, typename _Up,
|
||||||
bool = __ptrtr_rebind_helper<_Tp, _Up>::value,
|
bool = __ptrtr_rebind_helper<_Tp, _Up>::__value,
|
||||||
bool = __ptrtr_rebind_helper2<_Tp, _Up>::value>
|
bool = __ptrtr_rebind_helper2<_Tp, _Up>::__value>
|
||||||
struct __ptrtr_rebind;
|
struct __ptrtr_rebind;
|
||||||
|
|
||||||
template<typename _Tp, typename _Up, bool _B2>
|
template<typename _Tp, typename _Up, bool _B2>
|
||||||
@ -178,8 +178,9 @@ _GLIBCXX_HAS_NESTED_TYPE(difference_type)
|
|||||||
{ typedef typename __ptrtr_rebind<_Ptr, _Up>::__type __type; };
|
{ typedef typename __ptrtr_rebind<_Ptr, _Up>::__type __type; };
|
||||||
|
|
||||||
// allocator_traits needs to use __rebind
|
// allocator_traits needs to use __rebind
|
||||||
template<typename> struct allocator_traits;
|
template<typename> friend struct allocator_traits;
|
||||||
template<typename, typename> class __ptrtr_rebind_helper2;
|
template<typename> friend struct pointer_traits;
|
||||||
|
template<typename, typename> friend class __ptrtr_rebind_helper2;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -42,6 +42,9 @@
|
|||||||
#include <bits/stl_iterator_base_types.h>
|
#include <bits/stl_iterator_base_types.h>
|
||||||
#include <ext/cast.h>
|
#include <ext/cast.h>
|
||||||
#include <ext/type_traits.h>
|
#include <ext/type_traits.h>
|
||||||
|
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
||||||
|
# include <bits/ptr_traits.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
|
namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
|
||||||
{
|
{
|
||||||
@ -567,4 +570,40 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||||||
_GLIBCXX_END_NAMESPACE_VERSION
|
_GLIBCXX_END_NAMESPACE_VERSION
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
#ifdef __GXX_EXPERIMENTAL_CXX0X__
|
||||||
|
namespace std _GLIBCXX_VISIBILITY(default)
|
||||||
|
{
|
||||||
|
_GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
|
|
||||||
|
template<typename _Storage_policy>
|
||||||
|
struct pointer_traits<__gnu_cxx::_Pointer_adapter<_Storage_policy>>
|
||||||
|
{
|
||||||
|
/// The pointer type
|
||||||
|
typedef __gnu_cxx::_Pointer_adapter<_Storage_policy> pointer;
|
||||||
|
/// The type pointed to
|
||||||
|
typedef typename pointer::element_type element_type;
|
||||||
|
/// Type used to represent the difference between two pointers
|
||||||
|
typedef typename pointer::difference_type difference_type;
|
||||||
|
|
||||||
|
/* TODO: replace __rebind<U> with alias template rebind<U> */
|
||||||
|
/*
|
||||||
|
template<typename _Up>
|
||||||
|
using rebind<_Up> = typename __gnu_cxx::_Pointer_adapter<
|
||||||
|
typename pointer_traits<_Storage_policy>::rebind<_Up>>
|
||||||
|
*/
|
||||||
|
template<typename _Up>
|
||||||
|
class __rebind
|
||||||
|
{
|
||||||
|
typedef pointer_traits<_Storage_policy> _Policy_traits;
|
||||||
|
typedef typename _Policy_traits::template __rebind<_Up>::__type
|
||||||
|
_Rebound_policy;
|
||||||
|
public:
|
||||||
|
typedef typename __gnu_cxx::_Pointer_adapter<_Rebound_policy> __type;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
_GLIBCXX_END_NAMESPACE_VERSION
|
||||||
|
} // namespace
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // _POINTER_H
|
#endif // _POINTER_H
|
||||||
|
Loading…
Reference in New Issue
Block a user