7#include "../macros.hpp"
12hi_export_module(hikogui.utility.forward_value);
14hi_export
namespace hi::inline
v1 {
33 using type = std::remove_cvref_t<T>;
35 [[nodiscard]] type operator()(T
const &t)
const noexcept
41#define HI_X(TEMPLATE_TYPE, RETURN_TYPE, ARGUMENT_TYPE) \
43 struct forward_value<TEMPLATE_TYPE> { \
44 using type = RETURN_TYPE; \
46 [[nodiscard]] type operator()(ARGUMENT_TYPE t) const noexcept \
53HI_X(std::string_view,
std::string, std::string_view
const &)
54HI_X(std::string_view
const,
std::string, std::string_view
const &)
55HI_X(std::string_view &,
std::string, std::string_view
const &)
56HI_X(std::string_view
const &,
std::string, std::string_view
const &)
71template<std::
size_t N>
73 using type =
char const *;
75 [[nodiscard]]
constexpr type operator()(
char const (&t)[N])
const noexcept
77 return static_cast<char const *
>(t);
DOXYGEN BUG.
Definition algorithm_misc.hpp:20
typename forward_value< T >::type forward_value_t
Get the storage type of the forward_value functor.
Definition forward_value.hpp:86
Functor for forwarding an forwarding-reference to variable.
Definition forward_value.hpp:32