Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::intrusive::pointer_traits< Ptr > Struct Template Reference

pointer_traits is the implementation of C++11 std::pointer_traits class with some extensions like castings. More...

#include <pointer_traits.hpp>

Inheritance diagram for boost::intrusive::pointer_traits< Ptr >:

Classes

struct  rebind_pointer
 

Public Types

typedef Ptr pointer
 
template<class U >
using rebind = typename boost::intrusive::pointer_rebind< Ptr, U >::type
 

Public Member Functions

typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT (boost::intrusive::detail::, Ptr, element_type, boost::intrusive::detail::first_param< Ptr >) element_type
 
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT (boost::intrusive::detail::, Ptr, difference_type, std::ptrdiff_t) difference_type
 
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT (boost::intrusive::detail::, Ptr, reference, typename boost::intrusive::detail::unvoid_ref< element_type >::type) reference
 

Static Public Member Functions

static pointer pointer_to (reference r)
 Remark: If element_type is (possibly cv-qualified) void, r type is unspecified; otherwise, it is element_type &. More...
 
template<class UPtr >
static pointer static_cast_from (const UPtr &uptr)
 Remark: Non-standard extension. More...
 
template<class UPtr >
static pointer const_cast_from (const UPtr &uptr)
 Remark: Non-standard extension. More...
 
template<class UPtr >
static pointer dynamic_cast_from (const UPtr &uptr)
 Remark: Non-standard extension. More...
 

Detailed Description

template<typename Ptr>
struct boost::intrusive::pointer_traits< Ptr >

pointer_traits is the implementation of C++11 std::pointer_traits class with some extensions like castings.

pointer_traits supplies a uniform interface to certain attributes of pointer-like types.

Member Typedef Documentation

template<typename Ptr>
typedef Ptr boost::intrusive::pointer_traits< Ptr >::pointer
template<typename Ptr>
template<class U >
using boost::intrusive::pointer_traits< Ptr >::rebind = typename boost::intrusive::pointer_rebind<Ptr, U>::type

Member Function Documentation

template<typename Ptr>
typedef boost::intrusive::pointer_traits< Ptr >::BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT ( boost::intrusive::detail::  ,
Ptr  ,
difference_type  ,
std::ptrdiff_t   
)
template<typename Ptr>
typedef boost::intrusive::pointer_traits< Ptr >::BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT ( boost::intrusive::detail::  ,
Ptr  ,
reference  ,
typename boost::intrusive::detail::unvoid_ref< element_type >::type   
)
template<typename Ptr>
typedef boost::intrusive::pointer_traits< Ptr >::BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT ( boost::intrusive::detail::  ,
Ptr  ,
element_type  ,
boost::intrusive::detail::first_param< Ptr >   
)
template<typename Ptr>
template<class UPtr >
static pointer boost::intrusive::pointer_traits< Ptr >::dynamic_cast_from ( const UPtr &  uptr)
inlinestatic

Remark: Non-standard extension.

Returns: A dereferenceable pointer to r obtained by calling Ptr::dynamic_cast_from(r). If such function does not exist, returns pointer_to(dynamic_cast<element_type>(&*uptr))

template<typename Ptr>
template<class UPtr >
static pointer boost::intrusive::pointer_traits< Ptr >::static_cast_from ( const UPtr &  uptr)
inlinestatic

Remark: Non-standard extension.

Returns: A dereferenceable pointer to r obtained by calling Ptr::static_cast_from(r). If such function does not exist, returns pointer_to(static_cast<element_type&>(*uptr))

Referenced by boost::container::stable_vector< T, Allocator >::begin(), boost::container::stable_vector< T, Allocator >::erase(), boost::container::stable_vector_iterator< Pointer, IsConst >::node_pointer(), and boost::container::stable_vector_iterator< Pointer, IsConst >::operator[]().


The documentation for this struct was generated from the following files: