std::from_range, std::from_range_t
From cppreference.com
| Defined in header <ranges>
|
||
| struct from_range_t { explicit from_range_t() = default; }; |
(since C++23) | |
| inline constexpr std::from_range_t 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.
Contents |
[edit] Standard library
The following standard library types use std::from_range_t type in their constructors:
Containers library | |
| (C++23) |
constructs the vector from a range (public member function of std::vector<T,Allocator>)
|
| (C++26) |
constructs the inplace_vector from a range (public member function of std::inplace_vector<T,N>)
|
| (C++26) |
constructs the hive from a range (public member function of Template:cpp/container/hive/title)
|
| (C++23) |
constructs the deque from a range (public member function of std::deque<T,Allocator>)
|
| (C++23) |
constructs the forward_list from a range (public member function of std::forward_list<T,Allocator>)
|
| (C++23) |
constructs the list from a range (public member function of std::list<T,Allocator>)
|
| (C++23) |
constructs the set from a range (public member function of std::set<Key,Compare,Allocator>)
|
| (C++23) |
constructs the map from a range (public member function of std::map<Key,T,Compare,Allocator>)
|
| (C++23) |
constructs the multiset from a range (public member function of std::multiset<Key,Compare,Allocator>)
|
| (C++23) |
constructs the multimap from a range (public member function of std::multimap<Key,T,Compare,Allocator>)
|
| (C++23) |
constructs the unordered_set from a range (public member function of std::unordered_set<Key,Hash,KeyEqual,Allocator>)
|
| (C++23) |
constructs the unordered_map from a range (public member function of std::unordered_map<Key,T,Hash,KeyEqual,Allocator>)
|
| (C++23) |
constructs the unordered_multiset from a range (public member function of std::unordered_multiset<Key,Hash,KeyEqual,Allocator>)
|
| (C++23) |
constructs the unordered_multimap from a range (public member function of std::unordered_multimap<Key,T,Hash,KeyEqual,Allocator>)
|
| | |