Namespaces
Variants
Views
Actions

std::from_range, std::from_range_t

From cppreference.com
< cpp‎ | ranges
Revision as of 02:32, 29 July 2022 by Cooky (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
 
 
Ranges library
Range adaptors
 
Defined in header <ranges>
struct from_range_t { explicit from_range_t() = default; };
(since C++23)
inline constexpr std::from_range from_range {};
(since C++23)

std::from_range is a disambiguation tag that can be passed to the constructors of the suitable containers to indicate that the contained member is range constructed.

The corresponding type std::from_range_t can be used in the constructor's parameter list to match the intended tag.

See also

constructs a new non-view object from an input range
(function template) [edit]