diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor5.C')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor5.C | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor5.C b/gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor5.C new file mode 100644 index 00000000000..2044ab59f4c --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor5.C @@ -0,0 +1,18 @@ +// { dg-do compile { target concepts } } + +template <class T> struct A +{ + constexpr A(T) requires (sizeof(T) > 1) {} + + A(T); +}; + +template <class T> struct B: A<T> +{ + using A<T>::A; +}; + +int main() +{ + constexpr B<int> b = 42; +} |