Skip to content

Search topics & cppreference

Search all study topics, concept maps, and 6,587 C++ and C reference pages.

std::common_type<tuple-like>

The common type of two tuple-like types is a std::tuple consists of the common types of all corresponding element type pairs of both types.

Utility
  • C++11
  • C++23
1 min readView on cppreference
NotebookLM
Defined in header <tuple>
template< tuple-like TTuple, tuple-like UTuple >
    requires /* see below */
struct common_type<TTuple, UTuple>;
(since C++23)

The common type of two tuple-like types is a std::tuple consists of the common types of all corresponding element type pairs of both types.

Given

the following constraints need to be satisfied:

Member types

Member type Definition
type std::tuple<std::common_type_t<TTypes, UTypes>...>

Example

This section is incomplete
Reason: no example

See also

determines the common type of a group of types
(class template)
determines the common type of two pairs
(class template specialization)

Content from this page on cppreference.com, licensed under CC-BY-SA 3.0 and GFDL. Modified: restyled, site navigation removed, code windows added. Offline snapshot of 9 February 2025.