Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/cpp2a/concepts-pr67969.C @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | 1830386684a0 |
children |
line wrap: on
line source
// { dg-do compile { target c++2a } } // { dg-additional-options "-fconcepts-ts" } template <class, class> class NumericArray {}; template <class> constexpr bool match_numeric_array = false; template <class Scalar, class Shape> constexpr bool match_numeric_array<NumericArray<Scalar, Shape>> = true; template <class T> concept bool cpt_NumericArrayContainer() { return match_numeric_array<T>; } template <class X> concept bool cpt_NumericArray() { return requires{requires cpt_NumericArrayContainer<X>();}; } template <class X> requires !cpt_NumericArray<X>() auto func(int, X) {} template <class X> requires cpt_NumericArray<X>() auto func(int, X) {} int main() { NumericArray<double, int> v5; func(0, v5); }