Function get

Summary

#include <include/type_safe/strong_typedef.hpp>

(1) template <class Tag, typename T>
    TYPE_SAFE_CONSTEXPR14 T & get(strong_typedef< Tag, T > &type) noexcept

(2) template <class Tag, typename T>
    constexpr const T & get(const strong_typedef< Tag, T > &type) noexcept

(3) template <class Tag, typename T>
    TYPE_SAFE_CONSTEXPR14 T && get(strong_typedef< Tag, T > &&type) noexcept

(4) template <class Tag, typename T>
    constexpr const T && get(const strong_typedef< Tag, T > &&type) noexcept

Function overload

Synopsis

#include <include/type_safe/strong_typedef.hpp>

template <class Tag, typename T>
TYPE_SAFE_CONSTEXPR14 T & get(strong_typedef< Tag, T > &type) noexcept

Description

Accesses the underlying value.

Returns
A reference to the underlying value. \group strong_typedef_get

Source

Lines 114-118 in include/type_safe/strong_typedef.hpp.

template <class Tag, typename T>
TYPE_SAFE_CONSTEXPR14 T& get(strong_typedef<Tag, T>& type) noexcept
{
    return static_cast<T&>(type);
}

Synopsis

#include <include/type_safe/strong_typedef.hpp>

template <class Tag, typename T>
constexpr const T & get(const strong_typedef< Tag, T > &type) noexcept

Description

\group strong_typedef_get

Source

Lines 121-125 in include/type_safe/strong_typedef.hpp.

template <class Tag, typename T>
constexpr const T& get(const strong_typedef<Tag, T>& type) noexcept
{
    return static_cast<const T&>(type);
}

Synopsis

#include <include/type_safe/strong_typedef.hpp>

template <class Tag, typename T>
TYPE_SAFE_CONSTEXPR14 T && get(strong_typedef< Tag, T > &&type) noexcept

Description

\group strong_typedef_get

Source

Lines 128-132 in include/type_safe/strong_typedef.hpp.

template <class Tag, typename T>
TYPE_SAFE_CONSTEXPR14 T&& get(strong_typedef<Tag, T>&& type) noexcept
{
    return static_cast<T&&>(static_cast<T&>(type));
}

Synopsis

#include <include/type_safe/strong_typedef.hpp>

template <class Tag, typename T>
constexpr const T && get(const strong_typedef< Tag, T > &&type) noexcept

Description

\group strong_typedef_get

Source

Lines 135-139 in include/type_safe/strong_typedef.hpp.

template <class Tag, typename T>
constexpr const T&& get(const strong_typedef<Tag, T>&& type) noexcept
{
    return static_cast<const T&&>(static_cast<const T&>(type));
}





Add Discussion as Guest

Log in