---
name: "std::common_with"
section: "3"
platform: "linux"
package: "gcc"
version: "16.2.1+r23+gd564253eb6c8-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/std::common_with"
---

# std::common\_with(3)

\[concept.common\], concept common\_with

## NAME

std::common\_with - \[concept.common\], concept common\_with

## SYNOPSIS

\#include \<concepts\>

## Concept definition

```
    template<typename _Tp, typename _Up>
    concept common_with = same_as<common_type_t<_Tp, _Up>, common_type_t<_Up, _Tp>>
      && requires {
        static_cast<common_type_t<_Tp, _Up>>(std::declval<_Tp>());
        static_cast<common_type_t<_Tp, _Up>>(std::declval<_Up>());
      }
      && common_reference_with<add_lvalue_reference_t<const _Tp>,
                               add_lvalue_reference_t<const _Up>>
      && common_reference_with<add_lvalue_reference_t<common_type_t<_Tp, _Up>>,
                               common_reference_t<
                                 add_lvalue_reference_t<const _Tp>,
                                 add_lvalue_reference_t<const _Up>>>
```

## Detailed Description

\[concept.common\], concept common\_with

## Author

Generated automatically by Doxygen for libstdc++ from the source code.
