|
iceoryx2
C++ 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.
References Optional().
Referenced by operator!=, operator!=, operator=(), operator=(), operator=(), operator==, operator==, Optional(), Optional(), and Optional().
|
constexprdefault |
References Optional().
|
constexprdefault |
References Optional().
|
inlineconstexprnoexcept |
Definition at line 189 of file optional.hpp.
|
inlineconstexpr |
Definition at line 197 of file optional.hpp.
References value().
|
default |
References IOX2_CONSTEXPR_DTOR.
|
inlineconstexprnoexcept |
Definition at line 202 of file optional.hpp.
References value().
|
inlineconstexprnoexcept |
Definition at line 269 of file optional.hpp.
Referenced by operator*(), operator*(), operator*(), operator*(), value(), value(), value(), and value().
|
inlineexplicitconstexprnoexcept |
Definition at line 265 of file optional.hpp.
|
inlineconstexprnoexcept |
Definition at line 249 of file optional.hpp.
References iox2::bb::detail::SourceLocation::current(), has_value(), and IOX2_ENFORCE_INTERNAL.
|
inlineconstexprnoexcept |
Definition at line 241 of file optional.hpp.
References iox2::bb::detail::SourceLocation::current(), has_value(), and IOX2_ENFORCE_INTERNAL.
|
inlineconstexprnoexcept |
Definition at line 257 of file optional.hpp.
References iox2::bb::detail::SourceLocation::current(), has_value(), and IOX2_ENFORCE_INTERNAL.
|
inlineconstexprnoexcept |
Definition at line 233 of file optional.hpp.
References iox2::bb::detail::SourceLocation::current(), has_value(), and IOX2_ENFORCE_INTERNAL.
|
inlineconstexprnoexcept |
Definition at line 225 of file optional.hpp.
|
inlineconstexprnoexcept |
Definition at line 229 of file optional.hpp.
|
constexprdefault |
References Optional().
|
inlineconstexprnoexcept |
Definition at line 216 of file optional.hpp.
References Optional(), and reset().
|
constexprdefault |
References Optional().
|
inlineconstexprnoexcept |
Definition at line 318 of file optional.hpp.
Referenced by operator=().
|
inlineconstexpr |
Definition at line 286 of file optional.hpp.
References iox2::bb::detail::SourceLocation::current(), has_value(), and IOX2_ENFORCE_INTERNAL.
|
inlineconstexpr |
Definition at line 280 of file optional.hpp.
References iox2::bb::detail::SourceLocation::current(), has_value(), and IOX2_ENFORCE_INTERNAL.
|
inlineconstexpr |
Definition at line 293 of file optional.hpp.
References iox2::bb::detail::SourceLocation::current(), has_value(), and IOX2_ENFORCE_INTERNAL.
|
inlineconstexpr |
Definition at line 274 of file optional.hpp.
References iox2::bb::detail::SourceLocation::current(), has_value(), and IOX2_ENFORCE_INTERNAL.
Referenced by emplace(), and Optional().
|
inlineconstexpr |
Definition at line 309 of file optional.hpp.
|
inlineconstexpr |
Definition at line 300 of file optional.hpp.
Definition at line 329 of file optional.hpp.
References Optional().
Definition at line 332 of file optional.hpp.
References Optional().
Definition at line 323 of file optional.hpp.
References Optional().
Definition at line 326 of file optional.hpp.
References Optional().