Go to the documentation of this file.
12 #ifndef BOOST_OPTIONAL_DETAIL_OPTIONAL_REFERENCE_SPEC_AJK_03OCT2015_HPP
13 #define BOOST_OPTIONAL_DETAIL_OPTIONAL_REFERENCE_SPEC_AJK_03OCT2015_HPP
15 #ifdef BOOST_OPTIONAL_CONFIG_NO_PROPER_ASSIGN_FROM_CONST_INT
26 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
31 #ifndef BOOST_OPTIONAL_CONFIG_ALLOW_BINDING_TO_RVALUES
33 "binding rvalue references to optional lvalue references is disallowed");
41 "binding rvalue references to optional lvalue references is disallowed");
42 return boost::forward<T>(r);
45 #endif // BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
50 #ifndef BOOST_OPTIONAL_CONFIG_ALLOW_BINDING_TO_RVALUES
51 #ifdef BOOST_OPTIONAL_CONFIG_NO_PROPER_ASSIGN_FROM_CONST_INT
55 "binding const lvalue references to integral types is disabled in this compiler");
63 static const bool value =
false;
122 #ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
126 : ptr_(
boost::
addressof(r)) { detail::prevent_binding_rvalue<R>(); }
130 : ptr_(cond ?
boost::
addressof(r) : 0) { detail::prevent_binding_rvalue<R>(); }
142 { detail::prevent_binding_rvalue<R>();
return ptr_ ? *ptr_ : r; }
146 { detail::prevent_binding_rvalue<R>();
return ptr_ ? *ptr_ : r; }
155 #else // BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
167 detail::prevent_assignment_from_false_const_integral<U>();
177 {
return ptr_ ? *ptr_ : v; }
181 {
return ptr_ ? *ptr_ : v; }
188 T& value_or_eval(F f)
const {
return ptr_ ? *ptr_ :
f(); }
190 #endif // BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
203 #endif // header guard
void swap(any &lhs, any &rhs) BOOST_NOEXCEPT
void emplace(R &&r, BOOST_DEDUCED_TYPENAME boost::enable_if< detail::is_no_optional< R > >::type *=0) BOOST_NOEXCEPT
optional(none_t) BOOST_NOEXCEPT
#define BOOST_STATIC_ASSERT_MSG(...)
BOOST_DEDUCED_TYPENAME boost::enable_if< detail::is_no_optional< R >, optional< T & > & >::type operator=(R &&r) BOOST_NOEXCEPT
#define BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()
The macro defines a noexcept explicit operator of conversion to bool.
void swap(optional< T & > &x, optional< T & > &y) BOOST_NOEXCEPT
BOOST_NORETURN void throw_exception(E const &e)
BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE.
optional() BOOST_NOEXCEPT
BOOST_FORCEINLINE T * addressof(T &v)
optional & operator=(const optional< U & > &rhs) BOOST_NOEXCEPT
T & get_value_or(R &&r, BOOST_DEDUCED_TYPENAME boost::enable_if< detail::is_no_optional< R > >::type *=0) const BOOST_NOEXCEPT
optional & operator=(none_t) BOOST_NOEXCEPT
optional(const optional< U & > &rhs) BOOST_NOEXCEPT
optional(const optional &rhs) BOOST_NOEXCEPT
T & value_or_eval(F f) const
#define BOOST_ASSERT(expr)
optional(R &&r, BOOST_DEDUCED_TYPENAME boost::enable_if< detail::is_no_optional< R > >::type *=0) BOOST_NOEXCEPT
optional & operator=(const optional &rhs) BOOST_NOEXCEPT
bool is_initialized() const BOOST_NOEXCEPT
void reset(R &&r, BOOST_DEDUCED_TYPENAME boost::enable_if< detail::is_no_optional< R > >::type *=0) BOOST_NOEXCEPT
bool operator!() const BOOST_NOEXCEPT
#define BOOST_DEDUCED_TYPENAME
boost::detail::remove_rvalue_ref< T >::type type
T & value_or(R &&r, BOOST_DEDUCED_TYPENAME boost::enable_if< detail::is_no_optional< R > >::type *=0) const BOOST_NOEXCEPT
void prevent_assignment_from_false_const_integral()
optional(bool cond, R &&r, BOOST_DEDUCED_TYPENAME boost::enable_if< detail::is_no_optional< R > >::type *=0) BOOST_NOEXCEPT
void prevent_binding_rvalue()
T * get_ptr() const BOOST_NOEXCEPT
void swap(optional &rhs) BOOST_NOEXCEPT
BOOST_DEDUCED_TYPENAME boost::remove_reference< T >::type & forward_reference(T &&r)
sick_visionary_ros
Author(s): SICK AG TechSupport 3D Snapshot
autogenerated on Thu Feb 8 2024 03:45:34