Go to the documentation of this file.
17 #ifndef BOOST_OPTIONAL_OPTIONAL_FLC_19NOV2002_HPP
18 #define BOOST_OPTIONAL_OPTIONAL_FLC_19NOV2002_HPP
55 #ifdef BOOST_OPTIONAL_CONFIG_USE_OLD_IMPLEMENTATION_OF_OPTIONAL
60 namespace optional_detail {
62 struct optional_tag {} ;
66 class optional_base :
public optional_tag
80 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
109 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
136 if ( rhs.is_initialized() )
140 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
147 if ( rhs.is_initialized() )
152 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
154 template<
class Expr,
class PtrExpr>
185 if ( rhs.is_initialized() )
191 if ( rhs.is_initialized() )
196 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
202 if ( rhs.is_initialized() )
208 if ( rhs.is_initialized() )
221 #ifndef BOOST_OPTIONAL_CONFIG_RESTORE_ASSIGNMENT_OF_NONCONVERTIBLE_TYPES
232 #ifndef BOOST_OPTIONAL_CONFIG_RESTORE_ASSIGNMENT_OF_NONCONVERTIBLE_TYPES
240 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
248 if ( rhs.is_initialized() )
254 if ( rhs.is_initialized() )
255 construct(
static_cast<ref_type
>(rhs.get()));
268 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
282 #ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
284 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
285 template<
class Expr,
class ExprPtr>
329 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
338 #if (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) && (!defined BOOST_NO_CXX11_VARIADIC_TEMPLATES)
341 template<
class... Args>
348 #elif (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
388 #ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
390 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
393 void construct ( Expr&& factory, in_place_factory_base
const* )
401 void construct ( Expr&& factory, typed_in_place_factory_base
const* )
425 void construct ( Expr
const& factory, in_place_factory_base
const* )
433 void construct ( Expr
const& factory, typed_in_place_factory_base
const* )
457 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
484 void construct ( Expr
const& expr,
void const* )
502 #ifdef BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION
515 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
518 void construct ( Expr&& expr, optional_tag
const* )
520 if ( expr.is_initialized() )
531 void construct ( Expr
const& expr, optional_tag
const* )
533 if ( expr.is_initialized() )
542 #endif // defined BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION
545 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
563 #if BOOST_WORKAROUND(BOOST_MSVC, <= 1600)
574 template <
typename U>
576 :
boost::conditional< boost::is_base_of<optional_detail::optional_tag, BOOST_DEDUCED_TYPENAME boost::decay<U>::type>::value
577 || boost::is_same<BOOST_DEDUCED_TYPENAME boost::decay<U>::type, none_t>::value,
578 boost::true_type, boost::false_type>
::type
581 #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1800) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40500) && !defined(__SUNPRO_CC)
585 template <
typename T,
typename U>
587 :
boost::conditional< boost::is_base_of<boost::in_place_factory_base, BOOST_DEDUCED_TYPENAME boost::decay<U>::type>::value
588 || boost::is_base_of<boost::typed_in_place_factory_base, BOOST_DEDUCED_TYPENAME boost::decay<U>::type>::value
589 || boost::is_constructible<T, U&&>::value
590 , boost::true_type, boost::false_type>
::type
595 #define BOOST_OPTIONAL_DETAIL_NO_IS_CONSTRUCTIBLE_TRAIT
597 template <
typename,
typename>
601 #endif // is_convertible condition
603 template <
typename T,
typename U>
605 :
boost::conditional< !is_optional_related<U>::value && is_convertible_to_T_or_factory<T, U>::value
606 , boost::true_type, boost::false_type>
::type
623 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
643 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
668 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
677 if ( rhs.is_initialized() )
682 #ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
692 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
705 #endif // !defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
706 #endif // !defined BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
712 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
722 #if BOOST_WORKAROUND(_MSC_VER, <= 1600)
728 #if !defined(BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT) && !defined(BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION)
731 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
735 operator= ( Expr&& expr )
743 optional& operator= ( Expr
const& expr )
748 #endif // !defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
749 #endif // !defined(BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT) && !defined(BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION)
761 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
778 this->
assign(
static_cast<base const&
>(rhs) ) ;
782 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
787 this->
assign(
static_cast<base &&
>(rhs) ) ;
800 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
818 #if (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) && (!defined BOOST_NO_CXX11_VARIADIC_TEMPLATES)
821 template<
class... Args>
826 #elif (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
828 void emplace ( Arg&&
arg )
839 void emplace (
const Arg&
arg )
845 void emplace ( Arg&
arg )
883 #if (!defined BOOST_NO_CXX11_REF_QUALIFIERS) && (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
884 reference_const_type operator *() const& {
return this->
get() ; }
885 reference_type operator *() & {
return this->
get() ; }
886 reference_type_of_temporary_wrapper operator *() && {
return boost::move(this->
get()) ; }
888 reference_const_type operator *()
const {
return this->
get() ; }
889 reference_type operator *() {
return this->
get() ; }
890 #endif // !defined BOOST_NO_CXX11_REF_QUALIFIERS
892 #if (!defined BOOST_NO_CXX11_REF_QUALIFIERS) && (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
936 #ifndef BOOST_NO_CXX11_REF_QUALIFIERS
943 return boost::forward<U>(v);
952 return boost::forward<U>(v);
954 #elif !defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
961 return boost::forward<U>(v);
984 #ifndef BOOST_NO_CXX11_REF_QUALIFIERS
985 template <
typename F>
994 template <
typename F>
1003 template <
typename F>
1020 #endif // BOOST_OPTIONAL_CONFIG_USE_OLD_IMPLEMENTATION_OF_OPTIONAL
1024 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
1034 #ifndef BOOST_OPTIONAL_CONFIG_DONT_SPECIALIZE_OPTIONAL_REFS
1133 template<
class CharType,
class CharTrait>
1134 std::basic_ostream<CharType, CharTrait>&
1137 BOOST_STATIC_ASSERT_MSG(
sizeof(CharType) == 0,
"If you want to output boost::optional, include header <boost/optional/optional_io.hpp>");
1146 #endif // header guard
std::basic_ostream< CharType, CharTrait > & operator<<(std::basic_ostream< CharType, CharTrait > &os, optional_detail::optional_tag const &)
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(...)
BOOST_DEDUCED_TYPENAME optional< T >::reference_const_type get_optional_value_or(optional< T > const &opt, BOOST_DEDUCED_TYPENAME optional< T >::reference_const_type v)
#define BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()
The macro defines a noexcept explicit operator of conversion to bool.
value_type value_or(U &&v) const &
BOOST_DEDUCED_TYPENAME base::value_type value_type
void swap(optional &arg) BOOST_NOEXCEPT_IF(
void assign_value(argument_type val)
value_type value_or(U &&v) &&
void construct(Expr &&factory, in_place_factory_base const *)
pointer_const_type operator->() 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
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)
reference_type get_impl()
void assign_expr_to_initialized(Expr &&expr, void 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)
aligned_storage< T > storage_type
value_type value_or_eval(F f) &&
T && reference_type_of_temporary_wrapper
void assign(argument_type val)
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)
void assign_expr_to_initialized(Expr &&factory, typed_in_place_factory_base const *tag)
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)
optional< T > make_optional(T const &v)
BOOST_DEDUCED_TYPENAME base::reference_type reference_type
void assign(none_t) BOOST_NOEXCEPT
pointer_const_type get_ptr_impl() const
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
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)
void assign(optional< U > const &rhs)
optional_base(bool cond, argument_type val)
BOOST_DEDUCED_TYPENAME base::rval_reference_type rval_reference_type
optional_base(rval_reference_type val)
void const * address() const
BOOST_DEDUCED_TYPENAME optional< T >::reference_const_type get(optional< T > const &opt)
T const & reference_const_type
BOOST_DEDUCED_TYPENAME base::pointer_const_type pointer_const_type
void reset() BOOST_NOEXCEPT
T const * ptr_ref() const
void emplace(Args &&... args)
void construct(Expr &&expr, void const *)
reference_type_of_temporary_wrapper value() &&
optional_base(Expr &&expr, PtrExpr const *tag)
BOOST_MOVE_FORCEINLINE ::boost::move_detail::remove_reference< T >::type && move(T &&t) BOOST_NOEXCEPT
void assign_value(rval_reference_type val)
void assign(rval_reference_type val)
optional(optional &&rhs) BOOST_NOEXCEPT_IF(
aligned_storage< internal_type > storage_type
optional_base(optional_base const &rhs)
optional(Expr &&expr, BOOST_DEDUCED_TYPENAME boost::enable_if< optional_detail::is_optional_val_init_candidate< T, Expr > >::type *=0)
pointer_type get_ptr_impl()
optional(optional const &rhs)
optional(optional< U > const &rhs)
optional(bool cond, argument_type val)
BOOST_DEDUCED_TYPENAME base::argument_type argument_type
T const * pointer_const_type
sick_visionary_ros
Author(s): SICK AG TechSupport 3D Snapshot
autogenerated on Thu Feb 8 2024 03:45:34