| Iterator concepts | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Iterator primitives | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Algorithm concepts and utilities | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Indirect callable concepts | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Common algorithm requirements | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Utilities | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Iterator adaptors | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Defined in header <iterator> | ||
template<class F,class...Is> requires(std::indirectly_readable<Is>&& ...)&& | (since C++20) | |
The alias templateindirect_result_t obtains the result type of invoking aninvocable typeF on the result of dereferencingindirectly_readable typesIs....
| F | - | an invocable type |
| Is | - | indirectly readable types that are dereferenced to arguments |
#include <iterator>#include <type_traits> struct Fn{long operator()(constint&);int operator()(int&&);short operator()(int,int)const;auto operator()(constfloat)->int&;void operator()(int[8]);}; static_assert(std::is_same_v<std::indirect_result_t<Fn,constint*>,long> andstd::is_same_v<std::indirect_result_t<Fn,std::move_iterator<int*>>,int> andstd::is_same_v<std::indirect_result_t<const Fn,int*,int*>,short> andstd::is_same_v<std::indirect_result_t<Fn,float*>,int&> andstd::is_same_v<std::indirect_result_t<Fn,int**>,void>); int main(){}
(C++11)(removed in C++20)(C++17) | deduces the result type of invoking a callable object with a set of arguments (class template)[edit] |
(C++26) | computes the value type of anindirectly_readable type by projection(alias template)[edit] |