[algorithms.results]

# 26 Algorithms library [[algorithms]](./#algorithms)

## 26.5 Algorithm result types [algorithms.results]

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/algorithms.tex#L4200)

Each of the class templates specified in this subclause
has the template parameters, data members, and special members specified below,
and has no base classes or members other than those specified[.](#1.sentence-1)

namespace std::ranges {template<class I, class F>struct [in_fun_result](#lib:in_fun_result "26.5 Algorithm result types [algorithms.results]") {[[no_unique_address]] I [in](#lib:in_fun_result,in "26.5 Algorithm result types [algorithms.results]"); [[no_unique_address]] F [fun](#lib:in_fun_result,fun "26.5 Algorithm result types [algorithms.results]"); template<class I2, class F2>requires [convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_­to [concept.convertible]")<const I&, I2> && [convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_­to [concept.convertible]")<const F&, F2>constexpr operator in_fun_result<I2, F2>() const & {return {in, fun}; }template<class I2, class F2>requires [convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_­to [concept.convertible]")<I, I2> && [convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_­to [concept.convertible]")<F, F2>constexpr operator in_fun_result<I2, F2>() && {return {std::move(in), std::move(fun)}; }}; template<class I1, class I2>struct [in_in_result](#lib:in_in_result "26.5 Algorithm result types [algorithms.results]") {[[no_unique_address]] I1 [in1](#lib:in_in_result,in1 "26.5 Algorithm result types [algorithms.results]"); [[no_unique_address]] I2 [in2](#lib:in_in_result,in2 "26.5 Algorithm result types [algorithms.results]"); template<class II1, class II2>requires [convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_­to [concept.convertible]")<const I1&, II1> && [convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_­to [concept.convertible]")<const I2&, II2>constexpr operator in_in_result<II1, II2>() const & {return {in1, in2}; }template<class II1, class II2>requires [convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_­to [concept.convertible]")<I1, II1> && [convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_­to [concept.convertible]")<I2, II2>constexpr operator in_in_result<II1, II2>() && {return {std::move(in1), std::move(in2)}; }}; template<class I, class O>struct [in_out_result](#lib:in_out_result "26.5 Algorithm result types [algorithms.results]") {[[no_unique_address]] I [in](#lib:in_out_result,in "26.5 Algorithm result types [algorithms.results]"); [[no_unique_address]] O [out](#lib:in_out_result,out "26.5 Algorithm result types [algorithms.results]"); template<class I2, class O2>requires [convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_­to [concept.convertible]")<const I&, I2> && [convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_­to [concept.convertible]")<const O&, O2>constexpr operator in_out_result<I2, O2>() const & {return {in, out}; }template<class I2, class O2>requires [convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_­to [concept.convertible]")<I, I2> && [convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_­to [concept.convertible]")<O, O2>constexpr operator in_out_result<I2, O2>() && {return {std::move(in), std::move(out)}; }}; template<class I1, class I2, class O>struct [in_in_out_result](#lib:in_in_out_result "26.5 Algorithm result types [algorithms.results]") {[[no_unique_address]] I1 [in1](#lib:in_in_out_result,in1 "26.5 Algorithm result types [algorithms.results]"); [[no_unique_address]] I2 [in2](#lib:in_in_out_result,in2 "26.5 Algorithm result types [algorithms.results]"); [[no_unique_address]] O [out](#lib:in_in_out_result,out "26.5 Algorithm result types [algorithms.results]"); template<class II1, class II2, class OO>requires [convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_­to [concept.convertible]")<const I1&, II1> &&[convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_­to [concept.convertible]")<const I2&, II2> &&[convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_­to [concept.convertible]")<const O&, OO>constexpr operator in_in_out_result<II1, II2, OO>() const & {return {in1, in2, out}; }template<class II1, class II2, class OO>requires [convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_­to [concept.convertible]")<I1, II1> &&[convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_­to [concept.convertible]")<I2, II2> &&[convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_­to [concept.convertible]")<O, OO>constexpr operator in_in_out_result<II1, II2, OO>() && {return {std::move(in1), std::move(in2), std::move(out)}; }}; template<class I, class O1, class O2>struct [in_out_out_result](#lib:in_out_out_result "26.5 Algorithm result types [algorithms.results]") {[[no_unique_address]] I [in](#lib:in_out_out_result,in "26.5 Algorithm result types [algorithms.results]"); [[no_unique_address]] O1 [out1](#lib:in_out_out_result,out1 "26.5 Algorithm result types [algorithms.results]"); [[no_unique_address]] O2 [out2](#lib:in_out_out_result,out2 "26.5 Algorithm result types [algorithms.results]"); template<class II, class OO1, class OO2>requires [convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_­to [concept.convertible]")<const I&, II> &&[convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_­to [concept.convertible]")<const O1&, OO1> &&[convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_­to [concept.convertible]")<const O2&, OO2>constexpr operator in_out_out_result<II, OO1, OO2>() const & {return {in, out1, out2}; }template<class II, class OO1, class OO2>requires [convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_­to [concept.convertible]")<I, II> &&[convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_­to [concept.convertible]")<O1, OO1> &&[convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_­to [concept.convertible]")<O2, OO2>constexpr operator in_out_out_result<II, OO1, OO2>() && {return {std::move(in), std::move(out1), std::move(out2)}; }}; template<class T>struct [min_max_result](#lib:min_max_result "26.5 Algorithm result types [algorithms.results]") {[[no_unique_address]] T [min](#lib:min_max_result,min "26.5 Algorithm result types [algorithms.results]"); [[no_unique_address]] T [max](#lib:min_max_result,max "26.5 Algorithm result types [algorithms.results]"); template<class T2>requires [convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_­to [concept.convertible]")<const T&, T2>constexpr operator min_max_result<T2>() const & {return {min, max}; }template<class T2>requires [convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_­to [concept.convertible]")<T, T2>constexpr operator min_max_result<T2>() && {return {std::move(min), std::move(max)}; }}; template<class I>struct [in_found_result](#lib:in_found_result "26.5 Algorithm result types [algorithms.results]") {[[no_unique_address]] I [in](#lib:in_found_result,in "26.5 Algorithm result types [algorithms.results]"); bool [found](#lib:in_found_result,found "26.5 Algorithm result types [algorithms.results]"); template<class I2>requires [convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_­to [concept.convertible]")<const I&, I2>constexpr operator in_found_result<I2>() const & {return {in, found}; }template<class I2>requires [convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_­to [concept.convertible]")<I, I2>constexpr operator in_found_result<I2>() && {return {std::move(in), found}; }}; template<class I, class T>struct [in_value_result](#lib:in_value_result "26.5 Algorithm result types [algorithms.results]") {[[no_unique_address]] I [in](#lib:in_value_result,in "26.5 Algorithm result types [algorithms.results]"); [[no_unique_address]] T [value](#lib:in_value_result,value "26.5 Algorithm result types [algorithms.results]"); template<class I2, class T2>requires [convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_­to [concept.convertible]")<const I&, I2> && [convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_­to [concept.convertible]")<const T&, T2>constexpr operator in_value_result<I2, T2>() const & {return {in, value}; }template<class I2, class T2>requires [convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_­to [concept.convertible]")<I, I2> && [convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_­to [concept.convertible]")<T, T2>constexpr operator in_value_result<I2, T2>() && {return {std::move(in), std::move(value)}; }}; template<class O, class T>struct [out_value_result](#lib:out_value_result "26.5 Algorithm result types [algorithms.results]") {[[no_unique_address]] O [out](#lib:out_value_result,out "26.5 Algorithm result types [algorithms.results]"); [[no_unique_address]] T [value](#lib:out_value_result,value "26.5 Algorithm result types [algorithms.results]"); template<class O2, class T2>requires [convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_­to [concept.convertible]")<const O&, O2> && [convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_­to [concept.convertible]")<const T&, T2>constexpr operator out_value_result<O2, T2>() const & {return {out, value}; }template<class O2, class T2>requires [convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_­to [concept.convertible]")<O, O2> && [convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_­to [concept.convertible]")<T, T2>constexpr operator out_value_result<O2, T2>() && {return {std::move(out), std::move(value)}; }};}
