Namespaces | |
| namespace | pmr |
Classes | |
| class | bad_optional_access |
| class | bad_variant_access |
| class | basic_string_view |
| struct | conjunction |
| struct | conjunction< A > |
| struct | conjunction< A, B... > |
| struct | disjunction |
| struct | disjunction< A > |
| struct | disjunction< A, B... > |
| struct | in_place_index_t |
| struct | in_place_t |
| struct | in_place_type_t |
| struct | is_nothrow_swappable |
| struct | is_swappable |
| struct | monostate |
| struct | negation |
| struct | nullopt_t |
| class | optional |
| class | variant |
| struct | variant_alternative |
| struct | variant_alternative< N, const V< Ts... > > |
| struct | variant_alternative< N, V< Ts... > > |
| struct | variant_size |
| struct | variant_size< const V > |
| struct | variant_size< V< Ts... > > |
Typedefs | |
| using | string_view = basic_string_view<char> |
| template<typename...> | |
| using | void_t = void |
| template<size_t N, typename V> | |
| using | variant_alternative_t = typename variant_alternative<N, V>::type |
Enumerations | |
| enum class | byte : unsigned char |
Functions | |
| template<typename InputIt, typename ForwardIt> | |
| ForwardIt | uninitialized_move (InputIt first, InputIt last, ForwardIt destination) |
| template<typename T> | |
| CETL_NODISCARD constexpr T * | launder (T *const p) noexcept |
| template<typename CharT> | |
| void | swap (basic_string_view< CharT > &lhs, basic_string_view< CharT > &rhs) noexcept |
| constexpr bool | operator== (const monostate, const monostate) noexcept |
| constexpr bool | operator!= (const monostate, const monostate) noexcept |
| constexpr bool | operator< (const monostate, const monostate) noexcept |
| constexpr bool | operator> (const monostate, const monostate) noexcept |
| constexpr bool | operator<= (const monostate, const monostate) noexcept |
| constexpr bool | operator>= (const monostate, const monostate) noexcept |
| template<typename T, typename... Ts> | |
| CETL_NODISCARD constexpr bool | holds_alternative (const variant< Ts... > &var) noexcept |
| template<typename Fun, typename... Vs> | |
| constexpr decltype(auto) | visit (Fun &&fun, Vs &&... vars) |
| template<typename... Ts> | |
| constexpr bool | operator== (const variant< Ts... > &lhs, const variant< Ts... > &rhs) |
| template<typename... Ts> | |
| constexpr bool | operator!= (const variant< Ts... > &lhs, const variant< Ts... > &rhs) |
| template<typename... Ts> | |
| constexpr bool | operator< (const variant< Ts... > &lhs, const variant< Ts... > &rhs) |
| template<typename... Ts> | |
| constexpr bool | operator> (const variant< Ts... > &lhs, const variant< Ts... > &rhs) |
| template<typename... Ts> | |
| constexpr bool | operator<= (const variant< Ts... > &lhs, const variant< Ts... > &rhs) |
| template<typename... Ts> | |
| constexpr bool | operator>= (const variant< Ts... > &lhs, const variant< Ts... > &rhs) |
| template<typename T, typename U> | |
| constexpr detail::opt::enable_comparison< decltype(std::declval< const T & >()==std::declval< const U & >())> | operator== (const optional< T > &lhs, const optional< U > &rhs) |
| template<typename T, typename U> | |
| constexpr detail::opt::enable_comparison< decltype(std::declval< const T & >() !=std::declval< const U & >())> | operator!= (const optional< T > &lhs, const optional< U > &rhs) |
| template<typename T, typename U> | |
| constexpr detail::opt::enable_comparison< decltype(std::declval< const T & >()< std::declval< const U & >())> | operator< (const optional< T > &lhs, const optional< U > &rhs) |
| template<typename T, typename U> | |
| constexpr detail::opt::enable_comparison< decltype(std::declval< const T & >()<=std::declval< const U & >())> | operator<= (const optional< T > &lhs, const optional< U > &rhs) |
| template<typename T, typename U> | |
| constexpr detail::opt::enable_comparison< decltype(std::declval< const T & >() > std::declval< const U & >())> | operator> (const optional< T > &lhs, const optional< U > &rhs) |
| template<typename T, typename U> | |
| constexpr detail::opt::enable_comparison< decltype(std::declval< const T & >() >=std::declval< const U & >())> | operator>= (const optional< T > &lhs, const optional< U > &rhs) |
| template<typename T> | |
| constexpr bool | operator== (const optional< T > &opt, const nullopt_t) noexcept |
| template<typename T> | |
| constexpr bool | operator== (const nullopt_t, const optional< T > &opt) noexcept |
| template<typename T> | |
| constexpr bool | operator!= (const optional< T > &opt, const nullopt_t) noexcept |
| template<typename T> | |
| constexpr bool | operator!= (const nullopt_t, const optional< T > &opt) noexcept |
| template<typename T> | |
| constexpr bool | operator< (const optional< T > &, const nullopt_t) noexcept |
| template<typename T> | |
| constexpr bool | operator< (const nullopt_t, const optional< T > &opt) noexcept |
| template<typename T> | |
| constexpr bool | operator<= (const optional< T > &opt, const nullopt_t) noexcept |
| template<typename T> | |
| constexpr bool | operator<= (const nullopt_t, const optional< T > &) noexcept |
| template<typename T> | |
| constexpr bool | operator> (const optional< T > &opt, const nullopt_t) noexcept |
| template<typename T> | |
| constexpr bool | operator> (const nullopt_t, const optional< T > &) noexcept |
| template<typename T> | |
| constexpr bool | operator>= (const optional< T > &, const nullopt_t) noexcept |
| template<typename T> | |
| constexpr bool | operator>= (const nullopt_t, const optional< T > &opt) noexcept |
| template<typename T, typename U> | |
| constexpr detail::opt::enable_comparison< decltype(std::declval< const T & >()==std::declval< const U & >())> | operator== (const optional< T > &opt, const U &value) |
| template<typename T, typename U> | |
| constexpr detail::opt::enable_comparison< decltype(std::declval< const T & >()==std::declval< const U & >())> | operator== (const T &value, const optional< U > &opt) |
| template<typename T, typename U> | |
| constexpr detail::opt::enable_comparison< decltype(std::declval< const T & >() !=std::declval< const U & >())> | operator!= (const optional< T > &opt, const U &value) |
| template<typename T, typename U> | |
| constexpr detail::opt::enable_comparison< decltype(std::declval< const T & >() !=std::declval< const U & >())> | operator!= (const T &value, const optional< U > &opt) |
| template<typename T, typename U> | |
| constexpr detail::opt::enable_comparison< decltype(std::declval< const T & >()< std::declval< const U & >())> | operator< (const optional< T > &opt, const U &value) |
| template<typename T, typename U> | |
| constexpr detail::opt::enable_comparison< decltype(std::declval< const T & >()< std::declval< const U & >())> | operator< (const T &value, const optional< U > &opt) |
| template<typename T, typename U> | |
| constexpr detail::opt::enable_comparison< decltype(std::declval< const T & >()<=std::declval< const U & >())> | operator<= (const optional< T > &opt, const U &value) |
| template<typename T, typename U> | |
| constexpr detail::opt::enable_comparison< decltype(std::declval< const T & >()<=std::declval< const U & >())> | operator<= (const T &value, const optional< U > &opt) |
| template<typename T, typename U> | |
| constexpr detail::opt::enable_comparison< decltype(std::declval< const T & >() > std::declval< const U & >())> | operator> (const optional< T > &opt, const U &value) |
| template<typename T, typename U> | |
| constexpr detail::opt::enable_comparison< decltype(std::declval< const T & >() > std::declval< const U & >())> | operator> (const T &value, const optional< U > &opt) |
| template<typename T, typename U> | |
| constexpr detail::opt::enable_comparison< decltype(std::declval< const T & >() >=std::declval< const U & >())> | operator>= (const optional< T > &opt, const U &value) |
| template<typename T, typename U> | |
| constexpr detail::opt::enable_comparison< decltype(std::declval< const T & >() >=std::declval< const U & >())> | operator>= (const T &value, const optional< U > &opt) |
| template<typename T> | |
| constexpr optional< std::decay_t< T > > | make_optional (T &&value) |
| template<typename T, typename... Args> | |
| constexpr optional< T > | make_optional (Args &&... args) |
| template<typename T, typename U, typename... Args> | |
| constexpr optional< T > | make_optional (std::initializer_list< U > il, Args &&... args) |
| template<std::size_t Ix, typename... Ts> | |
| CETL_NODISCARD constexpr std::add_pointer_t< variant_alternative_t< Ix, variant< Ts... > > > | get_if (variant< Ts... > *const var) noexcept |
| template<std::size_t Ix, typename... Ts> | |
| CETL_NODISCARD constexpr std::add_pointer_t< const variant_alternative_t< Ix, variant< Ts... > > > | get_if (const variant< Ts... > *const var) noexcept |
| template<typename T, typename... Ts> | |
| CETL_NODISCARD constexpr std::add_pointer_t< T > | get_if (variant< Ts... > *const var) noexcept |
| template<typename T, typename... Ts> | |
| CETL_NODISCARD constexpr std::add_pointer_t< const T > | get_if (const variant< Ts... > *const var) noexcept |
| template<std::size_t Ix, typename... Ts> | |
| CETL_NODISCARD constexpr variant_alternative_t< Ix, variant< Ts... > > & | get (variant< Ts... > &var) |
| template<std::size_t Ix, typename... Ts> | |
| CETL_NODISCARD constexpr variant_alternative_t< Ix, variant< Ts... > > && | get (variant< Ts... > &&var) |
| template<std::size_t Ix, typename... Ts> | |
| CETL_NODISCARD constexpr const variant_alternative_t< Ix, variant< Ts... > > & | get (const variant< Ts... > &var) |
| template<std::size_t Ix, typename... Ts> | |
| CETL_NODISCARD constexpr const variant_alternative_t< Ix, variant< Ts... > > && | get (const variant< Ts... > &&var) |
| template<typename T, typename... Ts> | |
| CETL_NODISCARD constexpr T & | get (variant< Ts... > &var) |
| template<typename T, typename... Ts> | |
| CETL_NODISCARD constexpr T && | get (variant< Ts... > &&var) |
| template<typename T, typename... Ts> | |
| CETL_NODISCARD constexpr const T & | get (const variant< Ts... > &var) |
| template<typename T, typename... Ts> | |
| CETL_NODISCARD constexpr const T && | get (const variant< Ts... > &&var) |
Variables | |
| constexpr nullopt_t | nullopt {nullopt_t::_detail::_detail} |
| template<typename T> | |
| constexpr bool | is_swappable_v = is_swappable<T>::value |
| template<typename T> | |
| constexpr bool | is_nothrow_swappable_v = is_nothrow_swappable<T>::value |
| template<typename... Ts> | |
| constexpr bool | conjunction_v = conjunction<Ts...>::value |
| template<typename... Ts> | |
| constexpr bool | disjunction_v = disjunction<Ts...>::value |
| template<typename T> | |
| constexpr bool | negation_v = negation<T>::value |
| constexpr in_place_t | in_place {} |
| template<typename T> | |
| constexpr in_place_type_t< T > | in_place_type {} |
| template<std::size_t I> | |
| constexpr in_place_index_t< I > | in_place_index {} |
| constexpr std::size_t | variant_npos = std::numeric_limits<std::size_t>::max() |
| template<typename V> | |
| constexpr size_t | variant_size_v = variant_size<V>::value |
This namespace contains C++17 polyfill (pf) types.
The types within this namespace adhere to the C++17 specification and should be drop-in replaceable with said standard types where they are available. CETL polyfill types may implement a sub-set of the required functionality but they will not implement non-compliant functionality.
| using cetl::pf17::variant_alternative_t = typename variant_alternative<N, V>::type |
Implementation of std::variant_alternative_t.
This implementation also accepts other typelist-parameterized classes, such as std::variant.
| using cetl::pf17::void_t = void |
Implementation of std::void_t.
|
strong |
A non-character type that implements the concept of a byte defined by the C++17 specification.
|
constexpr |
Implementation of std::get(std::variant).
References CETL_NODISCARD, get(), and cetl::pf17::variant< Ts >::index().
|
constexpr |
Implementation of std::get(std::variant).
References CETL_NODISCARD, and get().
|
constexpr |
Implementation of std::get(std::variant).
References CETL_NODISCARD, get(), and cetl::pf17::variant< Ts >::index().
|
constexpr |
Implementation of std::get(std::variant).
References CETL_NODISCARD, and get().
|
constexpr |
Implementation of std::get(std::variant).
References CETL_NODISCARD, get(), and cetl::pf17::variant< Ts >::index().
|
constexpr |
Implementation of std::get(std::variant).
References CETL_NODISCARD, and get().
|
constexpr |
Implementation of std::get(std::variant).
References CETL_NODISCARD, get(), and cetl::pf17::variant< Ts >::index().
Referenced by get(), get(), get(), and get().

|
constexpr |
Implementation of std::get(std::variant).
References CETL_NODISCARD, and get().
|
constexprnoexcept |
Implementation of std::get_if(std::variant).
References CETL_NODISCARD, get_if(), and cetl::pf17::variant< Ts >::index().
|
constexprnoexcept |
Implementation of std::get_if(std::variant).
References CETL_NODISCARD, and get_if().
|
constexprnoexcept |
Implementation of std::get_if(std::variant).
References CETL_NODISCARD, get_if(), and cetl::pf17::variant< Ts >::index().
Referenced by get_if(), and get_if().

|
constexprnoexcept |
Implementation of std::get_if(std::variant).
References CETL_NODISCARD, and get_if().
|
constexprnoexcept |
Implementation of std::holds_alternative.
References CETL_NODISCARD, holds_alternative(), and cetl::pf17::variant< Ts >::index().
Referenced by holds_alternative().

|
constexprnoexcept |
Returns a pointer to the object of type T that is located at the address p holds.
Since C++17 (P0137R1) a pointer obtained by casting the address of some storage does not point to an object that was later created in that storage with placement new; it has to be passed through std::launder first. This is std::launder where the standard library provides it. Before C++17 the cast pointer already points to the object, so this returns p unchanged.
| T | The type of the object. Must not be a function type or (cv-qualified) void. |
| p | The address of an object of type T that is within its lifetime. |
References CETL_NODISCARD, and std::launder().
|
constexpr |
An implementation of C++17 std::make_optional.
References std::forward(), in_place, and make_optional().
|
constexpr |
An implementation of C++17 std::make_optional.
References std::forward(), in_place, and make_optional().
|
constexpr |
An implementation of C++17 std::make_optional.
References std::forward(), and make_optional().
Referenced by make_optional(), make_optional(), and make_optional().

|
constexprnoexcept |
Compares an optional with a nullopt.
Equivalent to the above case when comparing to an optional that does not contain a value.
References operator!=().
|
constexpr |
Compares two optional objects, lhs and rhs.
The contained values are compared (using the corresponding operator of T) only if both lhs and rhs contain values. Otherwise,
Referenced by operator!=(), and operator!=().

|
constexprnoexcept |
Compares an optional with a nullopt.
Equivalent to the above case when comparing to an optional that does not contain a value.
References operator!=().
|
constexpr |
Compares an optional with a value.
The values are compared (using the corresponding operator of T) only if the optional contains a value. Otherwise, the optional is considered less than value.
References cetl::pf17::optional< T >::has_value().
|
constexpr |
Compares an optional with a value.
The values are compared (using the corresponding operator of T) only if the optional contains a value. Otherwise, the optional is considered less than value.
References cetl::pf17::optional< T >::has_value().
|
constexprnoexcept |
Compares an optional with a nullopt.
Equivalent to the above case when comparing to an optional that does not contain a value.
References operator<().
|
constexprnoexcept |
Compares an optional with a nullopt.
Equivalent to the above case when comparing to an optional that does not contain a value.
References operator<().
|
constexpr |
Compares two optional objects, lhs and rhs.
The contained values are compared (using the corresponding operator of T) only if both lhs and rhs contain values. Otherwise,
References cetl::pf17::optional< T >::has_value().
Referenced by operator<(), and operator<().

|
constexpr |
Compares an optional with a value.
The values are compared (using the corresponding operator of T) only if the optional contains a value. Otherwise, the optional is considered less than value.
References cetl::pf17::optional< T >::has_value().
|
constexpr |
Compares an optional with a value.
The values are compared (using the corresponding operator of T) only if the optional contains a value. Otherwise, the optional is considered less than value.
References cetl::pf17::optional< T >::has_value().
|
constexprnoexcept |
Compares an optional with a nullopt.
Equivalent to the above case when comparing to an optional that does not contain a value.
References operator<=().
|
constexpr |
Compares two optional objects, lhs and rhs.
The contained values are compared (using the corresponding operator of T) only if both lhs and rhs contain values. Otherwise,
Referenced by operator<=(), and operator<=().

|
constexprnoexcept |
Compares an optional with a nullopt.
Equivalent to the above case when comparing to an optional that does not contain a value.
References operator<=().
|
constexpr |
Compares an optional with a value.
The values are compared (using the corresponding operator of T) only if the optional contains a value. Otherwise, the optional is considered less than value.
References cetl::pf17::optional< T >::has_value().
|
constexpr |
Compares an optional with a value.
The values are compared (using the corresponding operator of T) only if the optional contains a value. Otherwise, the optional is considered less than value.
References cetl::pf17::optional< T >::has_value().
|
constexprnoexcept |
Compares an optional with a nullopt.
Equivalent to the above case when comparing to an optional that does not contain a value.
References operator==().
|
constexpr |
Compares two optional objects, lhs and rhs.
The contained values are compared (using the corresponding operator of T) only if both lhs and rhs contain values. Otherwise,
References cetl::pf17::optional< T >::has_value().
Referenced by operator==(), and operator==().

|
constexprnoexcept |
Compares an optional with a nullopt.
Equivalent to the above case when comparing to an optional that does not contain a value.
References operator==().
|
constexpr |
Compares an optional with a value.
The values are compared (using the corresponding operator of T) only if the optional contains a value. Otherwise, the optional is considered less than value.
References cetl::pf17::optional< T >::has_value().
|
constexpr |
Compares an optional with a value.
The values are compared (using the corresponding operator of T) only if the optional contains a value. Otherwise, the optional is considered less than value.
References cetl::pf17::optional< T >::has_value().
|
constexprnoexcept |
Compares an optional with a nullopt.
Equivalent to the above case when comparing to an optional that does not contain a value.
References operator>().
|
constexpr |
Compares two optional objects, lhs and rhs.
The contained values are compared (using the corresponding operator of T) only if both lhs and rhs contain values. Otherwise,
Referenced by operator>(), and operator>().

|
constexprnoexcept |
Compares an optional with a nullopt.
Equivalent to the above case when comparing to an optional that does not contain a value.
References operator>().
|
constexpr |
Compares an optional with a value.
The values are compared (using the corresponding operator of T) only if the optional contains a value. Otherwise, the optional is considered less than value.
References cetl::pf17::optional< T >::has_value().
|
constexpr |
Compares an optional with a value.
The values are compared (using the corresponding operator of T) only if the optional contains a value. Otherwise, the optional is considered less than value.
References cetl::pf17::optional< T >::has_value().
|
constexprnoexcept |
Compares an optional with a nullopt.
Equivalent to the above case when comparing to an optional that does not contain a value.
References operator>=().
|
constexprnoexcept |
Compares an optional with a nullopt.
Equivalent to the above case when comparing to an optional that does not contain a value.
References operator>=().
|
constexpr |
Compares two optional objects, lhs and rhs.
The contained values are compared (using the corresponding operator of T) only if both lhs and rhs contain values. Otherwise,
Referenced by operator>=(), and operator>=().

|
constexpr |
Compares an optional with a value.
The values are compared (using the corresponding operator of T) only if the optional contains a value. Otherwise, the optional is considered less than value.
References cetl::pf17::optional< T >::has_value().
|
constexpr |
Compares an optional with a value.
The values are compared (using the corresponding operator of T) only if the optional contains a value. Otherwise, the optional is considered less than value.
References cetl::pf17::optional< T >::has_value().
|
noexcept |
Exchanges the given string views.
| ForwardIt cetl::pf17::uninitialized_move | ( | InputIt | first, |
| InputIt | last, | ||
| ForwardIt | destination ) |
Polyfill for std::uninitialized_move.
Implements the sequential, three-argument overload. Constructs objects from [first, last) in uninitialized storage starting at destination. Execution-policy overloads and uninitialized_move_n are not provided.
Lvalue sources are moved from, even when copying could avoid a throwing move constructor. Other source expressions retain their value category, as specified by LWG 3918. The destination value type must be constructible from std::move(*first) for lvalue source expressions, or from *first otherwise, under the active C++ language version's initialization rules.
The source range must be valid and must not overlap the destination range. The destination must provide sufficient, suitably aligned uninitialized storage for every source element. Destruction of destination objects must not throw. The caller owns the destination storage; this function neither allocates nor deallocates it. On success, all constructed objects remain alive and the caller is responsible for destroying them.
When dereferencing the source produces a prvalue of the destination type, C++17 and newer require no copy/move constructor for destination construction. In C++14, the selected copy/move constructor must be accessible and not deleted, and callers must not assume that its invocation will be elided.
Source elements may already have been moved from when an exception occurs; their original values are not restored. When compiled with exceptions disabled, no exception rollback is provided.
Complexity is linear in the number of source elements, with one destination construction per element on success.
| InputIt | Source iterator type meeting the input iterator requirements. |
| ForwardIt | Destination iterator type meeting the forward iterator requirements. Assignment, comparison, increment, and indirection through valid iterators must not throw, and indirection must yield a reference to the iterator's value_type. |
| first | Beginning of the source range. |
| last | End of the source range. |
| destination | Beginning of the destination storage. |
destination if the source range is empty. | ... | With exceptions enabled, propagates any exception from construction or a source iterator operation. Every destination object successfully constructed by this call is destroyed exactly once before propagation, in an unspecified order. The object whose constructor failed is not destroyed. |
|
constexpr |
Implementation of std::visit.
References std::forward(), and visit().
Referenced by visit().

|
constexpr |
Implementation of std::conjunction_v.
|
constexpr |
Implementation of std::disjunction_v.
|
constexpr |
Polyfill for std::in_place.
Referenced by make_optional(), make_optional(), cetl::pf17::optional< T >::optional(), cetl::pf17::optional< T >::optional(), and cetl::pf17::optional< T >::optional().
|
constexpr |
|
constexpr |
Implementation of std::in_place_type.
|
constexpr |
Implementation of std::is_nothrow_swappable_v.
Referenced by cetl::pf17::optional< T >::swap().
|
constexpr |
Implementation of std::is_swappable_v.
Implementation of std::negation_v.
|
constexpr |
An implementation of C++17 std::nullopt.
|
constexpr |
Implementation of std::variant_npos.
Referenced by cetl::pf17::variant< Ts >::valueless_by_exception().
|
constexpr |
Implementation of std::variant_size_v.
This implementation also accepts other typelist-parameterized classes, such as std::variant.