/rel ops/operator cmp") (deprecated in C++20)  |  automatically generates comparison operators based on user-defined  operator  ==  and  operator  <   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/utility/rel_ops/dsc_operator_cmp&action=edit)  
  
###  [ [ edit ](/mwiki/index.php?title=cpp/utility&action=edit&section=20
"Edit section: Pairs and tuples") ]  [ Pairs ](/w/cpp/utility/pair
"cpp/utility/pair") and [ tuples ](/w/cpp/utility/tuple "cpp/utility/tuple")

Defined in header ` [ <utility> ](/w/cpp/header/utility "cpp/header/utility")
`  
---  
[ pair  ](/w/cpp/utility/pair "cpp/utility/pair") |  implements binary tuple, i.e. a pair of values   
(class template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/utility/dsc_pair&action=edit)  
[ piecewise_construct  piecewise_construct_t  ](/w/cpp/utility/piecewise_construct "cpp/utility/piecewise construct") (C++11)  |  piecewise construction tag   
(tag)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/utility/dsc_piecewise_construct&action=edit)  
[ integer_sequence  ](/w/cpp/utility/integer_sequence "cpp/utility/integer sequence") (C++14)  |  implements compile-time sequence of integers   
(class template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/utility/dsc_integer_sequence&action=edit)  
Defined in header ` [ <tuple> ](/w/cpp/header/tuple "cpp/header/tuple") `  
[ tuple  ](/w/cpp/utility/tuple "cpp/utility/tuple") (C++11)  |  implements fixed size container, which holds elements of possibly different types   
(class template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/utility/dsc_tuple&action=edit)  
[ apply  ](/w/cpp/utility/apply "cpp/utility/apply") (C++17)  |  calls a function with a tuple of arguments   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/utility/dsc_apply&action=edit)  
[ make_from_tuple  ](/w/cpp/utility/make_from_tuple "cpp/utility/make from tuple") (C++17)  |  construct an object with a tuple of arguments   
(function template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/utility/dsc_make_from_tuple&action=edit)  
  
#####  [ Tuple protocol ](/w/cpp/utility/tuple/tuple-like
"cpp/utility/tuple/tuple-like")  
  
Defined in header ` [ <tuple> ](/w/cpp/header/tuple "cpp/header/tuple") `  
Defined in header ` [ <utility> ](/w/cpp/header/utility "cpp/header/utility")
`  
Defined in header ` [ <array> ](/w/cpp/header/array "cpp/header/array") `  
Defined in header ` [ <ranges> ](/w/cpp/header/ranges "cpp/header/ranges") `  
[ tuple_size  ](/w/cpp/utility/tuple_size "cpp/utility/tuple size") (C++11)  |  obtains the number of elements of a tuple-like type   
(class template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/utility/dsc_tuple_size&action=edit)  
[ tuple_element  ](/w/cpp/utility/tuple_element "cpp/utility/tuple element") (C++11)  |  obtains the element types of a tuple-like type   
(class template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/utility/dsc_tuple_element&action=edit)  
  
###  [ [ edit ](/mwiki/index.php?title=cpp/utility&action=edit&section=21
"Edit section: Sum types and type erased wrappers") ]  Sum types and type
erased wrappers

Defined in header ` [ <optional> ](/w/cpp/header/optional
"cpp/header/optional") `  
---  
[ optional  ](/w/cpp/utility/optional "cpp/utility/optional") (C++17)  |  a wrapper that may or may not hold an object   
(class template)  [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/utility/dsc_optional&action=edit)  
Defined in header ` [ <expected> ](/w/cpp/header/expected
"cpp/header/expected") `  
[ expected  ](/w/cpp/utility/expected "cpp/utility/expected") (C++23)  |  a wrapper that contains either an expected or error value   
(class template)  [ [edit]
](https://en.cpprefere