Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/cpp2a/concepts-pr86269.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
1 // { dg-do compile { target c++2a } } | |
2 // { dg-additional-options "-fconcepts-ts" } | |
3 #include <type_traits> | |
4 | |
5 template<typename t2, typename t = std::remove_reference_t<t2>> | |
6 concept bool IntegralOrIntegralRef = std::is_integral_v<t>; | |
7 | |
8 template<IntegralOrIntegralRef t> | |
9 auto foo(t && v) | |
10 { | |
11 return v; | |
12 } | |
13 | |
14 int main() | |
15 { | |
16 int i = 7; | |
17 foo(8); | |
18 return foo(i); | |
19 } |