Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/cpp1z/ttp1.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
// CWG 150: Matching of template template-arguments excludes compatible // templates // { dg-options -fnew-ttp-matching } template<class T, class U = T> class B { /* ... */ }; #if __cpp_variadic_templates template <class ... Types> class C { /* ... */ }; #endif template<template<class> class P, class T> void f(P<T>); int main() { f(B<int>()); f(B<int,float>()); // { dg-error "no match" } #if __cpp_variadic_templates f(C<int>()); #endif }