Go to the documentation of this file.
13 #ifndef BOOST_OPTIONAL_DETAIL_OLD_OPTIONAL_IMPLEMENTATION_AJK_28JAN2015_HPP
14 #define BOOST_OPTIONAL_DETAIL_OLD_OPTIONAL_IMPLEMENTATION_AJK_28JAN2015_HPP
24 namespace optional_detail {
32 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
35 #ifdef BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES
38 static T&&
move(
T&& r) {
return r; }
55 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
65 template <
class To,
class From>
68 #ifndef BOOST_OPTIONAL_CONFIG_ALLOW_BINDING_TO_RVALUES
71 "binding rvalue references to optional lvalue references is disallowed");
83 #if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
110 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
139 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
170 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
177 if ( rhs.is_initialized() )
182 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
184 template<
class Expr,
class PtrExpr>
226 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
232 if ( rhs.is_initialized() )
238 if ( rhs.is_initialized() )
251 #ifndef BOOST_OPTIONAL_CONFIG_RESTORE_ASSIGNMENT_OF_NONCONVERTIBLE_TYPES
262 #ifndef BOOST_OPTIONAL_CONFIG_RESTORE_ASSIGNMENT_OF_NONCONVERTIBLE_TYPES
270 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
278 if ( rhs.is_initialized() )
284 if ( rhs.is_initialized() )
285 construct(
static_cast<ref_type
>(rhs.get()));
298 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
312 #ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
314 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
315 template<
class Expr,
class ExprPtr>
359 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
368 #if (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) && (!defined BOOST_NO_CXX11_VARIADIC_TEMPLATES)
371 template<
class... Args>
378 #elif (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
418 #ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
420 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
423 void construct ( Expr&& factory, in_place_factory_base
const* )
432 void construct ( Expr&& factory, typed_in_place_factory_base
const* )
457 void construct ( Expr
const& factory, in_place_factory_base
const* )
466 void construct ( Expr
const& factory, typed_in_place_factory_base
const* )
491 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
518 void construct ( Expr
const& expr,
void const* )
536 #ifdef BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION
549 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
552 void construct ( Expr&& expr, optional_tag
const* )
554 if ( expr.is_initialized() )
565 void construct ( Expr
const& expr, optional_tag
const* )
567 if ( expr.is_initialized() )
576 #endif // defined BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION
580 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
600 #if defined(BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS)
605 return caster.as_ptype;
610 return caster.as_ptype;
623 #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581))
657 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
677 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
681 {optional_detail::prevent_binding_rvalue_ref_to_optional_lvalue_ref<T, rval_reference_type>();}
702 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
711 if ( rhs.is_initialized() )
716 #ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
726 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
736 {optional_detail::prevent_binding_rvalue_ref_to_optional_lvalue_ref<T, Expr&&>();}
741 #endif // !defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
742 #endif // !defined BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
748 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
760 #if !defined(BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT) && !defined(BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION)
763 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
771 operator= ( Expr&& expr )
773 optional_detail::prevent_binding_rvalue_ref_to_optional_lvalue_ref<T, Expr&&>();
780 optional& operator= ( Expr
const& expr )
785 #endif // !defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
786 #endif // !defined(BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT) && !defined(BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION)
798 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
815 this->
assign(
static_cast<base const&
>(rhs) ) ;
819 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
824 this->
assign(
static_cast<base &&
>(rhs) ) ;
837 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
841 optional_detail::prevent_binding_rvalue_ref_to_optional_lvalue_ref<T, rval_reference_type>();
856 #if (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) && (!defined BOOST_NO_CXX11_VARIADIC_TEMPLATES)
859 template<
class... Args>
864 #elif (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
866 void emplace ( Arg&&
arg )
877 void emplace (
const Arg&
arg )
883 void emplace ( Arg&
arg )
921 #if (!defined BOOST_NO_CXX11_REF_QUALIFIERS) && (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
922 reference_const_type operator *() const& {
return this->
get() ; }
923 reference_type operator *() & {
return this->
get() ; }
926 reference_const_type operator *()
const {
return this->
get() ; }
927 reference_type operator *() {
return this->
get() ; }
928 #endif // !defined BOOST_NO_CXX11_REF_QUALIFIERS
930 #if (!defined BOOST_NO_CXX11_REF_QUALIFIERS) && (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
974 #ifndef BOOST_NO_CXX11_REF_QUALIFIERS
981 return boost::forward<U>(v);
990 return boost::forward<U>(v);
992 #elif !defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
999 return boost::forward<U>(v);
1022 #ifndef BOOST_NO_CXX11_REF_QUALIFIERS
1023 template <
typename F>
1032 template <
typename F>
1041 template <
typename F>
1059 #endif // header guard
optional_base(argument_type val)
void swap(any &lhs, any &rhs) BOOST_NOEXCEPT
void construct(argument_type val)
void assign(optional< U > &&rhs)
BOOST_DEDUCED_TYPENAME types::pointer_const_type pointer_const_type
pointer_type operator->()
void assign_expr_to_initialized(Expr &&factory, in_place_factory_base const *tag)
reference_type get_value_or(reference_type v)
#define BOOST_STATIC_ASSERT_MSG(...)
#define BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()
The macro defines a noexcept explicit operator of conversion to bool.
value_type value_or(U &&v) const &
T const * pointer_const_type
BOOST_DEDUCED_TYPENAME remove_const< raw_type >::type && rval_reference_type
pointer_type cast_ptr(internal_type *p, is_reference_tag)
BOOST_DEDUCED_TYPENAME base::value_type value_type
void swap(optional &arg) BOOST_NOEXCEPT_IF(
value_type value_or(U &&v) &&
void construct(Expr &&factory, in_place_factory_base const *)
BOOST_DEDUCED_TYPENAME ::boost::detail::make_reference_content< T >::type internal_type
internal_type const * get_object() const
pointer_const_type operator->() const
void assign_value(rval_reference_type val, is_not_reference_tag)
reference_const_type dereference(internal_type const *p, is_not_reference_tag) const
BOOST_NORETURN void throw_exception(E const &e)
reference_const_type get_impl() const
BOOST_DEDUCED_TYPENAME types::argument_type argument_type
BOOST_DEDUCED_TYPENAME types::reference_const_type reference_const_type
optional_base< T > this_type
static reference_type move(reference_type r)
raw_type & reference_type_of_temporary_wrapper
BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE.
void construct(rval_reference_type val)
BOOST_DEDUCED_TYPENAME types::rval_reference_type rval_reference_type
BOOST_FORCEINLINE T * addressof(T &v)
optional(none_t none_) BOOST_NOEXCEPT
void assign(optional_base &&rhs)
BOOST_DEDUCED_TYPENAME remove_reference< T >::type raw_type
reference_type get_impl()
void assign_expr_to_initialized(Expr &&expr, void const *)
pointer_const_type cast_ptr(internal_type const *p, is_reference_tag) const
void emplace_assign(Args &&... args)
optional() BOOST_NOEXCEPT
reference_const_type get_value_or(reference_const_type v) const
void assign(optional_base const &rhs)
void destroy_impl(is_reference_tag)
raw_type & reference_type
reference_type dereference(internal_type *p, is_reference_tag)
value_type value_or_eval(F f) &&
types_when_isnt_ref< T > types_when_not_ref
void assign(argument_type val)
T const & reference_const_type
BOOST_DEDUCED_TYPENAME types::pointer_type pointer_type
BOOST_MOVE_FORCEINLINE T && forward(typename ::boost::move_detail::remove_reference< T >::type &t) BOOST_NOEXCEPT
optional_base(optional_base &&rhs)
optional_detail::optional_base< T > base
reference_const_type get() const
BOOST_DEDUCED_TYPENAME types::reference_type reference_type
#define BOOST_ASSERT(expr)
void construct(Expr &&factory, typed_in_place_factory_base const *)
optional(rval_reference_type val)
pointer_type cast_ptr(internal_type *p, is_not_reference_tag)
void assign_expr_to_initialized(Expr &&factory, typed_in_place_factory_base const *tag)
BOOST_DEDUCED_TYPENAME is_reference< T >::type is_reference_predicate
bool operator!() const BOOST_NOEXCEPT
BOOST_DEDUCED_TYPENAME base::reference_type_of_temporary_wrapper reference_type_of_temporary_wrapper
boost_foreach_argument_dependent_lookup_hack tag
void assign_expr(Expr &&expr, ExprPtr const *tag)
void prevent_binding_rvalue_ref_to_optional_lvalue_ref()
BOOST_DEDUCED_TYPENAME base::reference_type reference_type
void destroy_impl(is_not_reference_tag)
void assign(none_t) BOOST_NOEXCEPT
pointer_const_type get_ptr_impl() const
reference_type dereference(internal_type *p, is_not_reference_tag)
mpl::true_ is_reference_tag
optional(argument_type val)
bool is_initialized() const
reference_const_type value() const &
#define BOOST_DEDUCED_TYPENAME
pointer_const_type get_ptr() const
#define BOOST_NOEXCEPT_IF(Predicate)
BOOST_DEDUCED_TYPENAME types::reference_type_of_temporary_wrapper reference_type_of_temporary_wrapper
types_when_is_ref< T > types_when_ref
BOOST_DEDUCED_TYPENAME base::pointer_type pointer_type
void reset(argument_type val)
void assign_value(argument_type val, is_not_reference_tag)
value_type value_or_eval(F f) const &
BOOST_DEDUCED_TYPENAME base::reference_const_type reference_const_type
optional(optional< U > &&rhs)
BOOST_DEDUCED_TYPENAME mpl::if_< is_reference_predicate, types_when_ref, types_when_not_ref >::type types
void assign(optional< U > const &rhs)
boost::detail::remove_rvalue_ref< T >::type type
optional_base(bool cond, argument_type val)
reference_const_type dereference(internal_type const *p, is_reference_tag) const
internal_type * get_object()
BOOST_DEDUCED_TYPENAME base::rval_reference_type rval_reference_type
optional_base(rval_reference_type val)
void const * address() const
raw_type * pointer_const_type
BOOST_DEDUCED_TYPENAME optional< T >::reference_const_type get(optional< T > const &opt)
mpl::false_ is_not_reference_tag
BOOST_DEDUCED_TYPENAME base::pointer_const_type pointer_const_type
void reset() BOOST_NOEXCEPT
void emplace(Args &&... args)
void construct(Expr &&expr, void const *)
reference_type_of_temporary_wrapper value() &&
optional_base(Expr &&expr, PtrExpr const *tag)
boost::detail::decay_imp< Ty, boost::is_array< Ty >::value, boost::is_function< Ty >::value >::type type
void assign_value(argument_type val, is_reference_tag)
BOOST_MOVE_FORCEINLINE ::boost::move_detail::remove_reference< T >::type && move(T &&t) BOOST_NOEXCEPT
#define BOOST_STATIC_ASSERT(...)
void assign(rval_reference_type val)
optional(optional &&rhs) BOOST_NOEXCEPT_IF(
aligned_storage< internal_type > storage_type
optional_base(optional_base const &rhs)
T && reference_type_of_temporary_wrapper
void assign_value(rval_reference_type val, is_reference_tag)
optional(Expr &&expr, BOOST_DEDUCED_TYPENAME boost::disable_if_c<(boost::is_base_of< optional_detail::optional_tag, BOOST_DEDUCED_TYPENAME boost::decay< Expr >::type >::value)||boost::is_same< BOOST_DEDUCED_TYPENAME boost::decay< Expr >::type, none_t >::value >::type *=0)
pointer_type get_ptr_impl()
optional(optional const &rhs)
pointer_const_type cast_ptr(internal_type const *p, is_not_reference_tag) const
raw_type & reference_const_type
optional(optional< U > const &rhs)
static rval_reference_type move(reference_type r)
optional(bool cond, argument_type val)
BOOST_DEDUCED_TYPENAME base::argument_type argument_type
sick_visionary_ros
Author(s): SICK AG TechSupport 3D Snapshot
autogenerated on Thu Feb 8 2024 03:45:34