deductionguidesforstd::forward_list (3) - Linux Manuals
deductionguidesforstd::forward_list: deductionguidesforstd::forward_list
NAME
deductionguidesforstd::forward_list - deductionguidesforstd::forward_list
Synopsis
Defined in header <forward_list>
template< class InputIt,
class Alloc = std::allocator<typename std::iterator_traits<InputIt>::value_type>> (since C++17)
forward_list(InputIt, InputIt, Alloc = Alloc())
-> forward_list<typename std::iterator_traits<InputIt>::value_type, Alloc>;
This deduction_guide is provided for forward_list to allow deduction from an iterator range. This overload only participates in overload resolution if InputIt satisfies LegacyInputIterator and Alloc satisfies Allocator.
Note: the extent to which the library determines that a type does not satisfy LegacyInputIterator is unspecified, except that as a minimum integral types do not qualify as input iterators. Likewise, the extent to which it determines that a type does not satisfy Allocator is unspecified, except that as a minimum the member type Alloc::value_type must exist and the expression std::declval<Alloc&>().allocate(std::size_t{}) must be well-formed when treated as an unevaluated operand.
Example
// Run this code