Function xref

Summary

#include <include/type_safe/reference.hpp>

(1) template <typename T>
    constexpr xvalue_ref< T > xref(T &obj) noexcept

(2) template <typename T, std::size_t Size>
    array_xvalue_ref< T > xref(T(&arr)[Size]) noexcept

(3) template <typename T>
    array_xvalue_ref< T > xref(T *begin, T *end) noexcept

(4) template <typename T>
    array_xvalue_ref< T > xref(T *array, size_t size) noexcept

Function overload

Synopsis

#include <include/type_safe/reference.hpp>

template <typename T>
constexpr xvalue_ref< T > xref(T &obj) noexcept

Description

Creates a [ts::xvalue_ref]().

Returns
A [ts::xvalue_ref]() to the given object.

Source

Lines 248-252 in include/type_safe/reference.hpp.

template <typename T>
constexpr xvalue_ref<T> xref(T& obj) noexcept
{
    return xvalue_ref<T>(obj);
}

Synopsis

#include <include/type_safe/reference.hpp>

template <typename T, std::size_t Size>
array_xvalue_ref< T > xref(T(&arr)[Size]) noexcept

Description

Creates a [ts::array_xvalue_ref]().

Returns
The reference created by forwarding the parameter(s) to the constructor. \group array_xvalue_ref_ref

Source

Lines 460-464 in include/type_safe/reference.hpp.

template <typename T, std::size_t Size>
array_xvalue_ref<T> xref(T (&arr)[Size]) noexcept
{
    return array_xvalue_ref<T>(arr);
}

Synopsis

#include <include/type_safe/reference.hpp>

template <typename T>
array_xvalue_ref< T > xref(T *begin, T *end) noexcept

Description

\group array_xvalue_ref_ref

Source

Lines 467-471 in include/type_safe/reference.hpp.

template <typename T>
array_xvalue_ref<T> xref(T* begin, T* end) noexcept
{
    return array_xvalue_ref<T>(begin, end);
}

Synopsis

#include <include/type_safe/reference.hpp>

template <typename T>
array_xvalue_ref< T > xref(T *array, size_t size) noexcept

Description

\group array_xvalue_ref_ref

Source

Lines 474-478 in include/type_safe/reference.hpp.

template <typename T>
array_xvalue_ref<T> xref(T* array, size_t size) noexcept
{
    return array_xvalue_ref<T>(array, size);
}





Add Discussion as Guest

Log in