43 CPP_assert(copy_constructible<T>);
44 static_assert(std::is_object<T>::value,
45 "The template parameter of single_view must be an object type");
46 semiregular_box_t<T> value_;
47 template<
typename... Args>
49 : value_{
static_cast<Args &&
>(args)...}
51 template<
typename... Args>
53 : value_{in_place,
static_cast<Args &&
>(args)...}
62 : value_(std::move(t))
64 template(
class... Args)(
65 requires constructible_from<T, Args...>)
69 static_cast<Args &&
>(args)...}
71 constexpr T * begin()
noexcept
75 constexpr T
const * begin()
const noexcept
79 constexpr T * end()
noexcept
83 constexpr T
const * end()
const noexcept
87 static constexpr std::size_t size()
noexcept
91 constexpr T * data()
noexcept
93 return detail::addressof(
static_cast<T &
>(value_));
95 constexpr T
const * data()
const noexcept
97 return detail::addressof(
static_cast<T
const &
>(value_));