OZO 「お象」
Boost.Asio and libpq based asynchronous PostgreSQL unofficial header-only C++17 client library.
ozo::get_unwrapped_type< T > Struct Template Reference

#include <ozo/core/unwrap.h>

Description

template<typename T>
struct ozo::get_unwrapped_type< T >

Unwraps nullable or reference wrapped type.

Sometimes it is needed to know the underlying type of #Nullable or type is wrapped with std::reference_type. So that is why the type exists. Convenient shortcut is ozo::unwrap_type.

Template Parameters
T– type to unwrap.

Example

int a = 42;
auto ref_a = std::ref(a);
auto opt_a = std::make_optional(a);
static_assert(std::is_same<ozo::unwrap_type<decltype(ref_a)>, decltype(a)>);
static_assert(std::is_same<ozo::unwrap_type<decltype(opt_a)>, decltype(a)>);
See also
ozo::unwrap_type, ozo::unwrap

Types

using type = < unwrapped type >
 Unwrapped type.
 
ozo::unwrap_type
typename get_unwrapped_type< T >::type unwrap_type
Shortcut for ozo::get_unwrapped_type.
Definition: unwrap.h:107