Debian Codegraph @

libstdc++-v3/testsuite/20_util/common_reference/requirements/explicit_instantiation.cc

raw
1 // Copyright (C) 2019-2025 Free Software Foundation, Inc.
2 //
3 // This file is part of the GNU ISO C++ Library. This library is free
4 // software; you can redistribute it and/or modify it under the
5 // terms of the GNU General Public License as published by the
6 // Free Software Foundation; either version 3, or (at your option)
7 // any later version.
8
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13
14 // You should have received a copy of the GNU General Public License along
15 // with this library; see the file COPYING3. If not see
16 // <http://www.gnu.org/licenses/>.
17
18 // NB: This file is for testing type_traits with NO OTHER INCLUDES.
19
20 // { dg-do compile { target c++20 } }
21
22 #include <type_traits>
23
24 using test_type1 = int;
25 using test_type2 = int&;
26 using test_type3 = double;
27 using test_type4 = float&;
28 using test_type5 = void;
29 using test_type6 = const void;
30
31 namespace std
32 {
33 template struct common_reference<>;
34 template struct common_reference<test_type1>;
35 template struct common_reference<test_type1, test_type2>;
36 template struct common_reference<test_type1, test_type2, test_type3>;
37 template struct common_reference<test_type1, test_type2, test_type3, test_type4>;
38
39 template struct common_reference<test_type5>;
40 template struct common_reference<test_type5, test_type6>;
41 }