Function cref

Summary

#include <include/type_safe/reference.hpp>

(1) template <typename T>
    constexpr object_ref< const T > cref(const T &obj) noexcept

(2) template <typename T, std::size_t Size>
    array_ref< const T > cref(const T(&arr)[Size]) noexcept

(3) template <typename T>
    array_ref< const T > cref(const T *begin, const T *end) noexcept

(4) template <typename T>
    array_ref< const T > cref(const T *array, size_t size) noexcept

Function overload

Synopsis

#include <include/type_safe/reference.hpp>

template <typename T>
constexpr object_ref< const T > cref(const T &obj) noexcept

Description

\group object_ref_ref

Source

Lines 236-240 in include/type_safe/reference.hpp.

template <typename T>
constexpr object_ref<const T> cref(const T& obj) noexcept
{
    return object_ref<const T>(obj);
}

Synopsis

#include <include/type_safe/reference.hpp>

template <typename T, std::size_t Size>
array_ref< const T > cref(const T(&arr)[Size]) noexcept

Description

Creates a [ts::array_ref]() to const.

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

Source

Lines 433-437 in include/type_safe/reference.hpp.

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

Synopsis

#include <include/type_safe/reference.hpp>

template <typename T>
array_ref< const T > cref(const T *begin, const T *end) noexcept

Description

\group array_ref_cref

Source

Lines 440-444 in include/type_safe/reference.hpp.

template <typename T>
array_ref<const T> cref(const T* begin, const T* end) noexcept
{
    return array_ref<const T>(begin, end);
}

Synopsis

#include <include/type_safe/reference.hpp>

template <typename T>
array_ref< const T > cref(const T *array, size_t size) noexcept

Description

\group array_ref_cref

Source

Lines 447-451 in include/type_safe/reference.hpp.

template <typename T>
array_ref<const T> cref(const T* array, size_t size) noexcept
{
    return array_ref<const T>(array, size);
}





Add Discussion as Guest

Log in