Attribute value reference implementation for multiple types case. More...
#include <value_ref.hpp>
Public Types | |
| typedef T | value_type |
| Referenced value type. More... | |
| typedef TagT | tag_type |
| Tag type. More... | |
Public Member Functions | |
| void | reset () BOOST_NOEXCEPT |
| Resets the reference. More... | |
| template<typename U > | |
| enable_if< is_compatible< U > , const U * >::type | get_ptr () const BOOST_NOEXCEPT |
| Returns a pointer to the referred value. More... | |
| template<typename U > | |
| enable_if< is_compatible< U > , U const & >::type | get () const BOOST_NOEXCEPT |
| Returns a reference to the value. More... | |
| unsigned int | which () const BOOST_NOEXCEPT |
| Returns the stored type index. More... | |
| void | swap (variant_ref &that) BOOST_NOEXCEPT |
| Swaps two reference wrappers. More... | |
| template<typename VisitorT > | |
| VisitorT::result_type | apply_visitor (VisitorT visitor) const |
| Applies a visitor function object to the referred value. More... | |
| template<typename VisitorT > | |
| enable_if< is_void< typename VisitorT::result_type >, bool > ::type | apply_visitor_optional (VisitorT visitor) const |
| Applies a visitor function object to the referred value. More... | |
| template<typename VisitorT > | |
| disable_if< is_void< typename VisitorT::result_type > , optional< typename VisitorT::result_type > >::type | apply_visitor_optional (VisitorT visitor) const |
| Applies a visitor function object to the referred value. More... | |
| template<typename VisitorT , typename DefaultT > | |
| VisitorT::result_type | apply_visitor_or_default (VisitorT visitor, DefaultT &def_val) const |
| Applies a visitor function object to the referred value or returns a default value. More... | |
| template<typename VisitorT , typename DefaultT > | |
| VisitorT::result_type | apply_visitor_or_default (VisitorT visitor, DefaultT const &def_val) const |
| Applies a visitor function object to the referred value or returns a default value. More... | |
Protected Types | |
| template<typename U > | |
| using | is_compatible = mpl::contains< value_type, U > |
| The metafunction tests if the type is compatible with the reference wrapper. More... | |
Protected Member Functions | |
| variant_ref () BOOST_NOEXCEPT | |
| Default constructor. More... | |
| template<typename U > | |
| variant_ref (const U *p) BOOST_NOEXCEPT | |
| Initializing constructor. More... | |
Protected Attributes | |
| const void * | m_ptr |
| Pointer to the value. More... | |
| unsigned int | m_type_idx |
| Type index. More... | |
Attribute value reference implementation for multiple types case.
|
protected |
The metafunction tests if the type is compatible with the reference wrapper.
| typedef TagT boost::aux::variant_ref< T, TagT >::tag_type |
Tag type.
| typedef T boost::aux::variant_ref< T, TagT >::value_type |
Referenced value type.
|
inlineprotected |
Default constructor.
|
inlineexplicitprotected |
Initializing constructor.
|
inline |
Applies a visitor function object to the referred value.
References BOOST_ASSERT.
|
inline |
Applies a visitor function object to the referred value.
|
inline |
Applies a visitor function object to the referred value.
|
inline |
Applies a visitor function object to the referred value or returns a default value.
|
inline |
Applies a visitor function object to the referred value or returns a default value.
|
inline |
Returns a reference to the value.
References BOOST_ASSERT, and boost::multiprecision::backends::p.
|
inline |
Returns a pointer to the referred value.
References boost::aux::variant_ref< T, TagT >::m_ptr.
|
inline |
Resets the reference.
|
inline |
Swaps two reference wrappers.
References boost::aux::variant_ref< T, TagT >::m_ptr, boost::aux::variant_ref< T, TagT >::m_type_idx, and boost::multiprecision::backends::p.
|
inline |
Returns the stored type index.
References boost::aux::variant_ref< T, TagT >::m_type_idx.
|
protected |
Pointer to the value.
Referenced by boost::aux::variant_ref< T, TagT >::get_ptr(), and boost::aux::variant_ref< T, TagT >::swap().
|
protected |
Type index.
Referenced by boost::aux::variant_ref< T, TagT >::swap(), and boost::aux::variant_ref< T, TagT >::which().