9#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_UTILITY_FORWARD_LIKE_HPP_
10#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_UTILITY_FORWARD_LIKE_HPP_
16#include "arene/base/compiler_support/attributes.hpp"
17#include "arene/base/stdlib_choice/is_const.hpp"
18#include "arene/base/stdlib_choice/is_lvalue_reference.hpp"
19#include "arene/base/stdlib_choice/remove_reference.hpp"
20#include "arene/base/type_traits/conditional.hpp"
26namespace forward_like_detail {
30template <
typename From>
43 typename Referenced = conditional_t<
44 std::is_const<std::remove_reference_t<From>>::value,
45 std::remove_reference_t<To>
const,
46 std::remove_reference_t<To>>>
47 using forward_like_result_t = conditional_t<
48 std::is_lvalue_reference<From&&>::value,
67 template <
typename To>
68 ARENE_NODISCARD
constexpr auto operator()(To&& val)
const noexcept -> forward_like_result_t<To> {
69 return static_cast<forward_like_result_t<To>>(val);
94template <
typename From>
Definition array_exceptions_disabled.cpp:11
constexpr auto forward_like
A backport of C++23's std::forward_like @a , it allows forwarding a type with the same reference and ...
Copyright 2026, Toyota Motor Corporation.
Definition array_exceptions_disabled.cpp:10