.. _common_reference_with: *************************** meta::common_reference_with *************************** Defined in header ````. .. code-block:: cpp template concept common_reference_with = meta::same_as, meta::common_reference_t> && meta::convertible_to> && meta::convertible_to>; Pre-C++20 implementation of the :concept:`common_reference_with` concept. ---- Concept emulation ================= .. code-block:: cpp namespace mgs { namespace meta { template struct has_common_reference_with { /* ... */ }; template constexpr auto has_common_reference_with_v = has_common_reference_with::value; template >> using common_reference_with = T; } // namespace meta } // namespace mgs Example ======= .. code-block:: cpp #include using namespace mgs::meta; static_assert(has_common_reference_with_v, ""); static_assert(has_common_reference_with_v, ""); static_assert(!has_common_reference_with_v, ""); See also ======== * :ref:`convertible_to` * :ref:`common_reference`