40 struct single_view : view_interface<single_view<T>, (cardinality)1>
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>
48 constexpr single_view(
in_place_t, std::true_type, Args &&... args)
49 : value_{
static_cast<Args &&
>(args)...}
51 template<
typename... Args>
52 constexpr single_view(
in_place_t, std::false_type, Args &&... args)
53 : value_{in_place,
static_cast<Args &&
>(args)...}
57 single_view() =
default;
58 constexpr explicit single_view(T
const & t)
61 constexpr explicit single_view(T && t)
62 : value_(std::move(t))
64 template(
class... Args)(
65 requires constructible_from<T, Args...>)
66 constexpr single_view(
in_place_t, Args &&... args)
67 : single_view{in_place,
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_));
RANGES_INLINE_VARIABLE(detail::to_container_fn< detail::from_range< std::vector > >, to_vector) template< template< typename... > class ContT > auto to(RANGES_HIDDEN_DETAIL(detail
For initializing a container of the specified type with the elements of an Range.
Definition conversion.hpp:399