Warning: This file is not a C or C++ file. It does not have highlighting.

1// -*- C++ -*-
2//===----------------------------------------------------------------------===//
3//
4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5// See https://llvm.org/LICENSE.txt for license information.
6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef _LIBCPP___TYPE_TRAITS_IS_SPECIALIZATION
11#define _LIBCPP___TYPE_TRAITS_IS_SPECIALIZATION
12
13// This contains parts of P2098R1 but is based on MSVC STL's implementation.
14//
15// The paper has been rejected
16// We will not pursue P2098R0 (std::is_specialization_of) at this time; we'd
17// like to see a solution to this problem, but it requires language evolution
18// too.
19//
20// Since it is expected a real solution will be provided in the future only the
21// minimal part is implemented.
22//
23// Note a cvref qualified _Tp is never considered a specialization.
24
25#include <__config>
26
27#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
28# pragma GCC system_header
29#endif
30
31_LIBCPP_BEGIN_NAMESPACE_STD
32
33#if _LIBCPP_STD_VER >= 17
34
35template <class _Tp, template <class...> class _Template>
36inline constexpr bool __is_specialization_v = false; // true if and only if _Tp is a specialization of _Template
37
38template <template <class...> class _Template, class... _Args>
39inline constexpr bool __is_specialization_v<_Template<_Args...>, _Template> = true;
40
41#endif // _LIBCPP_STD_VER >= 17
42
43_LIBCPP_END_NAMESPACE_STD
44
45#endif // _LIBCPP___TYPE_TRAITS_IS_SPECIALIZATION
46

Warning: This file is not a C or C++ file. It does not have highlighting.

source code of libcxx/include/__type_traits/is_specialization.h