std::projected_value_t - cppreference.com (original) (raw)

The alias template projected_value_t obtains the value type by stripping any reference and its topmost cv-qualifiers of the result type of applying Proj to std::iter_value_t<I>&.

projected_value_t is used to determine the default value type in some algorithms such as ranges::contains.

[edit] Template parameters

I - an indirectly readable type
Proj - projection applied to an lvalue reference to value type of I

[edit] Notes

Feature-test macro Value Std Feature
__cpp_lib_algorithm_default_value_type 202403L (C++26) default template type for algorithm values using std::projected_value_t

[edit] Example

[edit] See also

| | computes the result of invoking a callable object on the result of dereferencing some set of indirectly_readable types(alias template)[edit] | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | helper template for specifying the constraints on algorithms that accept projections(alias template)[edit] |