|
iceoryx2
C++ Language Bindings
|
A drop-in replacement for C++17 std::optional.
More...
#include <optional.hpp>
Public Types | |
| using | value_type = T |
Public Member Functions | |
| constexpr | Optional () noexcept |
| constexpr | Optional (const Optional &rhs)=default |
| constexpr | Optional (Optional &&rhs)=default |
| constexpr | Optional (const NulloptT &) noexcept |
| template<typename U = std::remove_cv_t<T>, std::enable_if_t< std::is_constructible< T, U >::value &&!std::is_same< std::decay_t< U >, Optional< T > >::value &&!std::is_same< std::decay_t< U >, NulloptT >::value, bool > = true> | |
| constexpr | Optional (U &&value) |
| template<typename... Args> | |
| constexpr auto | emplace (Args &&... args) noexcept -> T & |
| IOX2_CONSTEXPR_DTOR | ~Optional ()=default |
| constexpr auto | operator= (NulloptT &) noexcept -> Optional & |
| constexpr auto | operator= (const Optional &rhs) -> Optional &=default |
| constexpr auto | operator= (Optional &&rhs) -> Optional &=default |
| constexpr auto | operator-> () const noexcept -> const T * |
| constexpr auto | operator-> () noexcept -> T * |
| constexpr auto | operator* () const &noexcept -> const T & |
| constexpr auto | operator* () &noexcept -> T & |
| constexpr auto | operator* () &&noexcept -> T && |
| constexpr auto | operator* () const &&noexcept -> const T && |
| constexpr | operator bool () const noexcept |
| constexpr auto | has_value () const noexcept -> bool |
| constexpr auto | value (const bb::detail::SourceLocation location=bb::detail::SourceLocation::current()) const &-> const T & |
| constexpr auto | value (const bb::detail::SourceLocation location=bb::detail::SourceLocation::current()) &-> T & |
| constexpr auto | value (const bb::detail::SourceLocation location=bb::detail::SourceLocation::current()) &&-> T && |
| constexpr auto | value (const bb::detail::SourceLocation location=bb::detail::SourceLocation::current()) const &&-> const T && |
| template<class U = std::remove_cv_t<T>> | |
| constexpr auto | value_or (U &&fallback) const &-> T |
| template<class U = std::remove_cv_t<T>> | |
| constexpr auto | value_or (U &&fallback) &&-> T |
| constexpr auto | reset () noexcept -> void |
Friends | |
| auto | operator== (const Optional< T > &lhs, NulloptT) noexcept -> bool |
| auto | operator== (NulloptT, const Optional< T > &rhs) noexcept -> bool |
| auto | operator!= (const Optional< T > &lhs, NulloptT) noexcept -> bool |
| auto | operator!= (NulloptT, const Optional< T > &rhs) noexcept -> bool |
A drop-in replacement for C++17 std::optional.
Definition at line 172 of file optional.hpp.
| using iox2::bb::stl::Optional< T >::value_type = T |
Definition at line 178 of file optional.hpp.
|
inlineconstexprnoexcept |
Definition at line 181 of file optional.hpp.
|
constexprdefault |
|
constexprdefault |
|
inlineconstexprnoexcept |
Definition at line 189 of file optional.hpp.
|
inlineconstexpr |
Definition at line 197 of file optional.hpp.
|
default |
|
inlineconstexprnoexcept |
Definition at line 202 of file optional.hpp.
References iox2::bb::stl::detail::OptionalValueHolder< T >::is_empty(), iox2::bb::stl::detail::OptionalValueHolder< T >::reset(), and iox2::bb::stl::detail::OptionalValueHolder< T >::set().
|
inlineconstexprnoexcept |
Definition at line 269 of file optional.hpp.
References iox2::bb::stl::detail::OptionalValueHolder< T >::is_empty().
|
inlineexplicitconstexprnoexcept |
Definition at line 265 of file optional.hpp.
References iox2::bb::stl::detail::OptionalValueHolder< T >::is_empty().
|
inlineconstexprnoexcept |
Definition at line 249 of file optional.hpp.
References IOX2_ENFORCE_INTERNAL.
|
inlineconstexprnoexcept |
Definition at line 241 of file optional.hpp.
References IOX2_ENFORCE_INTERNAL, and iox2::bb::stl::detail::OptionalValueHolder< T >::unchecked_get().
|
inlineconstexprnoexcept |
Definition at line 257 of file optional.hpp.
References IOX2_ENFORCE_INTERNAL.
|
inlineconstexprnoexcept |
Definition at line 233 of file optional.hpp.
References IOX2_ENFORCE_INTERNAL, and iox2::bb::stl::detail::OptionalValueHolder< T >::unchecked_get().
|
inlineconstexprnoexcept |
Definition at line 225 of file optional.hpp.
References iox2::bb::stl::detail::OptionalValueHolder< T >::is_empty(), and iox2::bb::stl::detail::OptionalValueHolder< T >::unchecked_get().
|
inlineconstexprnoexcept |
Definition at line 229 of file optional.hpp.
References iox2::bb::stl::detail::OptionalValueHolder< T >::is_empty(), and iox2::bb::stl::detail::OptionalValueHolder< T >::unchecked_get().
|
constexprdefault |
|
inlineconstexprnoexcept |
Definition at line 216 of file optional.hpp.
|
constexprdefault |
|
inlineconstexprnoexcept |
Definition at line 318 of file optional.hpp.
References iox2::bb::stl::detail::OptionalValueHolder< T >::reset().
|
inlineconstexpr |
Definition at line 286 of file optional.hpp.
References IOX2_ENFORCE_INTERNAL.
|
inlineconstexpr |
Definition at line 280 of file optional.hpp.
References IOX2_ENFORCE_INTERNAL, and iox2::bb::stl::detail::OptionalValueHolder< T >::unchecked_get().
|
inlineconstexpr |
Definition at line 293 of file optional.hpp.
References IOX2_ENFORCE_INTERNAL.
|
inlineconstexpr |
Definition at line 274 of file optional.hpp.
References IOX2_ENFORCE_INTERNAL, and iox2::bb::stl::detail::OptionalValueHolder< T >::unchecked_get().
|
inlineconstexpr |
Definition at line 309 of file optional.hpp.
References iox2::bb::stl::detail::OptionalValueHolder< T >::is_empty().
|
inlineconstexpr |
Definition at line 300 of file optional.hpp.
References iox2::bb::stl::detail::OptionalValueHolder< T >::is_empty(), and iox2::bb::stl::detail::OptionalValueHolder< T >::unchecked_get().
Definition at line 329 of file optional.hpp.
Definition at line 332 of file optional.hpp.
Definition at line 323 of file optional.hpp.
Definition at line 326 of file optional.hpp.