aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/concepts-pr86269.C
blob: 4428ee1796c4f355a466e8a5e3b4e206030210e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// { dg-do compile { target c++2a } }
// { dg-additional-options "-fconcepts-ts" }
#include <type_traits>

template<typename t2, typename t = std::remove_reference_t<t2>>
concept bool IntegralOrIntegralRef = std::is_integral_v<t>;

template<IntegralOrIntegralRef t>
auto foo(t && v)
{
  return v;
}

int main()
{
  int i = 7;
  foo(8);
  return foo(i);
}