__gnu_cxx::_Pointer_adapter< _Storage_policy >(3cxx) | __gnu_cxx::_Pointer_adapter< _Storage_policy >(3cxx) |
NAME¶
__gnu_cxx::_Pointer_adapter< _Storage_policy >
SYNOPSIS¶
#include <pointer.h>
Inherits _Storage_policy.
Public Types¶
typedef std::ptrdiff_t difference_type
typedef _Storage_policy::element_type element_type
typedef std::random_access_iterator_tag iterator_category
typedef _Pointer_adapter pointer
typedef _Reference_type< element_type >::reference reference
typedef _Unqualified_type< element_type >::type value_type
Public Member Functions¶
template<typename _Up > _Pointer_adapter (_Up *__arg)
_Pointer_adapter (const _Pointer_adapter &__arg)
template<typename _Up > _Pointer_adapter (const
_Pointer_adapter< _Up > &__arg)
_Pointer_adapter (element_type *__arg=0)
operator bool () const
reference operator* () const
_Pointer_adapter & operator++ ()
_Pointer_adapter operator++ (int)
_Pointer_adapter & operator+= (int __offset)
_Pointer_adapter & operator+= (long __offset)
_Pointer_adapter & operator+= (long long __offset)
_Pointer_adapter & operator+= (short __offset)
_Pointer_adapter & operator+= (unsigned int __offset)
_Pointer_adapter & operator+= (unsigned long __offset)
_Pointer_adapter & operator+= (unsigned long long __offset)
_Pointer_adapter & operator+= (unsigned short __offset)
template<typename _Up > std::ptrdiff_t operator- (const
_Pointer_adapter< _Up > &__rhs) const
_Pointer_adapter & operator-- ()
_Pointer_adapter operator-- (int)
_Pointer_adapter & operator-= (int __offset)
_Pointer_adapter & operator-= (long __offset)
_Pointer_adapter & operator-= (long long __offset)
_Pointer_adapter & operator-= (short __offset)
_Pointer_adapter & operator-= (unsigned int __offset)
_Pointer_adapter & operator-= (unsigned long __offset)
_Pointer_adapter & operator-= (unsigned long long __offset)
_Pointer_adapter & operator-= (unsigned short __offset)
element_type * operator-> () const
template<typename _Up > _Pointer_adapter & operator=
(_Up *__arg)
_Pointer_adapter & operator= (const _Pointer_adapter
&__arg)
template<typename _Up > _Pointer_adapter & operator=
(const _Pointer_adapter< _Up > &__arg)
reference operator[] (std::ptrdiff_t __index) const
Friends¶
_Pointer_adapter operator+ (const
_Pointer_adapter &__lhs, int __offset)
_Pointer_adapter operator+ (const _Pointer_adapter
&__lhs, long __offset)
_Pointer_adapter operator+ (const _Pointer_adapter
&__lhs, long long __offset)
_Pointer_adapter operator+ (const _Pointer_adapter
&__lhs, short __offset)
_Pointer_adapter operator+ (const _Pointer_adapter
&__lhs, unsigned int __offset)
_Pointer_adapter operator+ (const _Pointer_adapter
&__lhs, unsigned long __offset)
_Pointer_adapter operator+ (const _Pointer_adapter
&__lhs, unsigned long long __offset)
_Pointer_adapter operator+ (const _Pointer_adapter
&__lhs, unsigned short __offset)
_Pointer_adapter operator+ (int __offset, const
_Pointer_adapter &__rhs)
_Pointer_adapter operator+ (long __offset, const
_Pointer_adapter &__rhs)
_Pointer_adapter operator+ (long long __offset, const
_Pointer_adapter &__rhs)
_Pointer_adapter operator+ (short __offset, const
_Pointer_adapter &__rhs)
_Pointer_adapter operator+ (unsigned int __offset, const
_Pointer_adapter &__rhs)
_Pointer_adapter operator+ (unsigned long __offset, const
_Pointer_adapter &__rhs)
_Pointer_adapter operator+ (unsigned long long __offset, const
_Pointer_adapter &__rhs)
_Pointer_adapter operator+ (unsigned short __offset, const
_Pointer_adapter &__rhs)
template<typename _Up > std::ptrdiff_t operator- (_Up *__lhs,
const _Pointer_adapter &__rhs)
template<typename _Up > std::ptrdiff_t operator- (const
_Pointer_adapter &__lhs, _Up *__rhs)
std::ptrdiff_t operator- (const _Pointer_adapter &__lhs,
element_type *__rhs)
_Pointer_adapter operator- (const _Pointer_adapter
&__lhs, int __offset)
_Pointer_adapter operator- (const _Pointer_adapter
&__lhs, long __offset)
_Pointer_adapter operator- (const _Pointer_adapter
&__lhs, long long __offset)
_Pointer_adapter operator- (const _Pointer_adapter
&__lhs, short __offset)
_Pointer_adapter operator- (const _Pointer_adapter
&__lhs, unsigned int __offset)
_Pointer_adapter operator- (const _Pointer_adapter
&__lhs, unsigned long __offset)
_Pointer_adapter operator- (const _Pointer_adapter
&__lhs, unsigned long long __offset)
_Pointer_adapter operator- (const _Pointer_adapter
&__lhs, unsigned short __offset)
std::ptrdiff_t operator- (element_type *__lhs, const
_Pointer_adapter &__rhs)
Detailed Description¶
template<typename _Storage_policy>¶
class __gnu_cxx::_Pointer_adapter< _Storage_policy >"The following provides an 'alternative pointer' that works with the containers when specified as the pointer typedef of the allocator.
The pointer type used with the containers doesn't have to be this class, but it must support the implicit conversions, pointer arithmetic, comparison operators, etc. that are supported by this class, and avoid raising compile-time ambiguities. Because creating a working pointer can be challenging, this pointer template was designed to wrapper an easier storage policy type, so that it becomes reusable for creating other pointer types.
A key point of this class is also that it allows container writers to 'assume' Allocator::pointer is a typedef for a normal pointer. This class supports most of the conventions of a true pointer, and can, for instance handle implicit conversion to const and base class pointer types. The only impositions on container writers to support extended pointers are: 1) use the Allocator::pointer typedef appropriately for pointer types. 2) if you need pointer casting, use the __pointer_cast<> functions from ext/cast.h. This allows pointer cast operations to be overloaded as necessary by custom pointers.
Note: The const qualifier works with this pointer adapter as follows:
_Tp* == _Pointer_adapter<_Std_pointer_impl<_Tp> >; const _Tp* == _Pointer_adapter<_Std_pointer_impl<const _Tp> >; _Tp* const == const _Pointer_adapter<_Std_pointer_impl<_Tp> >; const _Tp* const == const _Pointer_adapter<_Std_pointer_impl<const _Tp> >;
Definition at line 272 of file pointer.h.
Member Typedef Documentation¶
template<typename _Storage_policy > typedef std::ptrdiff_t __gnu_cxx::_Pointer_adapter< _Storage_policy >::difference_type¶
Definition at line 280 of file pointer.h.
template<typename _Storage_policy > typedef _Storage_policy::element_type __gnu_cxx::_Pointer_adapter< _Storage_policy >::element_type¶
Definition at line 275 of file pointer.h.
template<typename _Storage_policy > typedef std::random_access_iterator_tag __gnu_cxx::_Pointer_adapter< _Storage_policy >::iterator_category¶
Definition at line 278 of file pointer.h.
template<typename _Storage_policy > typedef _Pointer_adapter __gnu_cxx::_Pointer_adapter< _Storage_policy >::pointer¶
Definition at line 281 of file pointer.h.
template<typename _Storage_policy > typedef _Reference_type<element_type>::reference __gnu_cxx::_Pointer_adapter< _Storage_policy >::reference¶
Definition at line 282 of file pointer.h.
template<typename _Storage_policy > typedef _Unqualified_type<element_type>::type __gnu_cxx::_Pointer_adapter< _Storage_policy >::value_type¶
Definition at line 279 of file pointer.h.
Constructor & Destructor Documentation¶
template<typename _Storage_policy > __gnu_cxx::_Pointer_adapter< _Storage_policy >::_Pointer_adapter (element_type * __arg = 0) [inline]¶
Definition at line 289 of file pointer.h.
template<typename _Storage_policy > __gnu_cxx::_Pointer_adapter< _Storage_policy >::_Pointer_adapter (const _Pointer_adapter< _Storage_policy > & __arg) [inline]¶
Definition at line 293 of file pointer.h.
template<typename _Storage_policy > template<typename _Up > __gnu_cxx::_Pointer_adapter< _Storage_policy >::_Pointer_adapter (_Up * __arg) [inline]¶
Definition at line 298 of file pointer.h.
template<typename _Storage_policy > template<typename _Up > __gnu_cxx::_Pointer_adapter< _Storage_policy >::_Pointer_adapter (const _Pointer_adapter< _Up > & __arg) [inline]¶
Definition at line 304 of file pointer.h.
template<typename _Storage_policy > __gnu_cxx::_Pointer_adapter< _Storage_policy >::~_Pointer_adapter () [inline]¶
Definition at line 308 of file pointer.h.
Member Function Documentation¶
template<typename _Storage_policy > __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator bool () const [inline], [explicit]¶
Definition at line 351 of file pointer.h.
template<typename _Storage_policy > reference __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator* () const [inline]¶
Definition at line 336 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator++ () [inline]¶
Definition at line 442 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator++ (int) [inline]¶
Definition at line 449 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator+= (int __offset) [inline]¶
Definition at line 431 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator+= (long __offset) [inline]¶
Definition at line 433 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator+= (long long __offset) [inline]¶
Definition at line 436 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator+= (short __offset) [inline]¶
Definition at line 429 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator+= (unsigned int __offset) [inline]¶
Definition at line 432 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator+= (unsigned long __offset) [inline]¶
Definition at line 434 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator+= (unsigned long long __offset) [inline]¶
Definition at line 437 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator+= (unsigned short __offset) [inline]¶
Definition at line 430 of file pointer.h.
template<typename _Storage_policy > template<typename _Up > std::ptrdiff_t __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator- (const _Pointer_adapter< _Up > & __rhs) const [inline]¶
Definition at line 390 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator-- () [inline]¶
Definition at line 457 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator-- (int) [inline]¶
Definition at line 464 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator-= (int __offset) [inline]¶
Definition at line 431 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator-= (long __offset) [inline]¶
Definition at line 433 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator-= (long long __offset) [inline]¶
Definition at line 436 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator-= (short __offset) [inline]¶
Definition at line 429 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator-= (unsigned int __offset) [inline]¶
Definition at line 432 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator-= (unsigned long __offset) [inline]¶
Definition at line 434 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator-= (unsigned long long __offset) [inline]¶
Definition at line 437 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator-= (unsigned short __offset) [inline]¶
Definition at line 430 of file pointer.h.
template<typename _Storage_policy > element_type * __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator-> () const [inline]¶
Definition at line 341 of file pointer.h.
template<typename _Storage_policy > template<typename _Up > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator= (_Up * __arg) [inline]¶
Definition at line 328 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator= (const _Pointer_adapter< _Storage_policy > & __arg) [inline]¶
Definition at line 312 of file pointer.h.
template<typename _Storage_policy > template<typename _Up > _Pointer_adapter & __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator= (const _Pointer_adapter< _Up > & __arg) [inline]¶
Definition at line 320 of file pointer.h.
template<typename _Storage_policy > reference __gnu_cxx::_Pointer_adapter< _Storage_policy >::operator[] (std::ptrdiff_t __index) const [inline]¶
Definition at line 346 of file pointer.h.
Friends And Related Function Documentation¶
template<typename _Storage_policy > _Pointer_adapter operator+ (const _Pointer_adapter< _Storage_policy > & __lhs, int __offset) [friend]¶
Definition at line 431 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter operator+ (const _Pointer_adapter< _Storage_policy > & __lhs, long __offset) [friend]¶
Definition at line 433 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter operator+ (const _Pointer_adapter< _Storage_policy > & __lhs, long long __offset) [friend]¶
Definition at line 436 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter operator+ (const _Pointer_adapter< _Storage_policy > & __lhs, short __offset) [friend]¶
Definition at line 429 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter operator+ (const _Pointer_adapter< _Storage_policy > & __lhs, unsigned int __offset) [friend]¶
Definition at line 432 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter operator+ (const _Pointer_adapter< _Storage_policy > & __lhs, unsigned long __offset) [friend]¶
Definition at line 434 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter operator+ (const _Pointer_adapter< _Storage_policy > & __lhs, unsigned long long __offset) [friend]¶
Definition at line 437 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter operator+ (const _Pointer_adapter< _Storage_policy > & __lhs, unsigned short __offset) [friend]¶
Definition at line 430 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter operator+ (int __offset, const _Pointer_adapter< _Storage_policy > & __rhs) [friend]¶
Definition at line 431 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter operator+ (long __offset, const _Pointer_adapter< _Storage_policy > & __rhs) [friend]¶
Definition at line 433 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter operator+ (long long __offset, const _Pointer_adapter< _Storage_policy > & __rhs) [friend]¶
Definition at line 436 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter operator+ (short __offset, const _Pointer_adapter< _Storage_policy > & __rhs) [friend]¶
Definition at line 429 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter operator+ (unsigned int __offset, const _Pointer_adapter< _Storage_policy > & __rhs) [friend]¶
Definition at line 432 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter operator+ (unsigned long __offset, const _Pointer_adapter< _Storage_policy > & __rhs) [friend]¶
Definition at line 434 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter operator+ (unsigned long long __offset, const _Pointer_adapter< _Storage_policy > & __rhs) [friend]¶
Definition at line 437 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter operator+ (unsigned short __offset, const _Pointer_adapter< _Storage_policy > & __rhs) [friend]¶
Definition at line 430 of file pointer.h.
template<typename _Storage_policy > template<typename _Up > std::ptrdiff_t operator- (_Up * __lhs, const _Pointer_adapter< _Storage_policy > & __rhs) [friend]¶
Definition at line 385 of file pointer.h.
template<typename _Storage_policy > template<typename _Up > std::ptrdiff_t operator- (const _Pointer_adapter< _Storage_policy > & __lhs, _Up * __rhs) [friend]¶
Definition at line 380 of file pointer.h.
template<typename _Storage_policy > std::ptrdiff_t operator- (const _Pointer_adapter< _Storage_policy > & __lhs, element_type * __rhs) [friend]¶
Definition at line 371 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter operator- (const _Pointer_adapter< _Storage_policy > & __lhs, int __offset) [friend]¶
Definition at line 431 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter operator- (const _Pointer_adapter< _Storage_policy > & __lhs, long __offset) [friend]¶
Definition at line 433 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter operator- (const _Pointer_adapter< _Storage_policy > & __lhs, long long __offset) [friend]¶
Definition at line 436 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter operator- (const _Pointer_adapter< _Storage_policy > & __lhs, short __offset) [friend]¶
Definition at line 429 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter operator- (const _Pointer_adapter< _Storage_policy > & __lhs, unsigned int __offset) [friend]¶
Definition at line 432 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter operator- (const _Pointer_adapter< _Storage_policy > & __lhs, unsigned long __offset) [friend]¶
Definition at line 434 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter operator- (const _Pointer_adapter< _Storage_policy > & __lhs, unsigned long long __offset) [friend]¶
Definition at line 437 of file pointer.h.
template<typename _Storage_policy > _Pointer_adapter operator- (const _Pointer_adapter< _Storage_policy > & __lhs, unsigned short __offset) [friend]¶
Definition at line 430 of file pointer.h.
template<typename _Storage_policy > std::ptrdiff_t operator- (element_type * __lhs, const _Pointer_adapter< _Storage_policy > & __rhs) [friend]¶
Definition at line 375 of file pointer.h.
Author¶
Generated automatically by Doxygen for libstdc++ from the source code.
Sun Jan 8 2023 | libstdc++ |