]> git.ipfire.org Git - thirdparty/gcc.git/blame - libstdc++-v3/testsuite/20_util/common_reference/requirements/explicit_instantiation.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 20_util / common_reference / requirements / explicit_instantiation.cc
CommitLineData
7adcbafe 1// Copyright (C) 2019-2022 Free Software Foundation, Inc.
0f8b14ee
JW
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-options "-std=gnu++2a" }
21// { dg-do compile { target c++2a } }
22
23#include <type_traits>
24
25using test_type1 = int;
26using test_type2 = int&;
27using test_type3 = double;
28using test_type4 = float&;
29using test_type5 = void;
30using test_type6 = const void;
31
32namespace std
33{
34 template struct common_reference<>;
35 template struct common_reference<test_type1>;
36 template struct common_reference<test_type1, test_type2>;
37 template struct common_reference<test_type1, test_type2, test_type3>;
38 template struct common_reference<test_type1, test_type2, test_type3, test_type4>;
39
40 template struct common_reference<test_type5>;
41 template struct common_reference<test_type5, test_type6>;
42}