gcc/testsuite/g++.dg/warn/Wctad-maybe-unsupported4.C
raw| 1 | // PR c++/105143 |
| 2 | // { dg-do compile { target c++17 } } |
| 3 | // { dg-additional-options "-Werror=ctad-maybe-unsupported" } |
| 4 | |
| 5 | template<class...> struct A { }; |
| 6 | |
| 7 | template<template<class...> class TT> auto f(...) -> decltype(TT()); // #1 |
| 8 | template<template<class...> class TT> void f(int); // #2 |
| 9 | |
| 10 | int main() { |
| 11 | f<A>(0); // Calls #2 without issuing a -Wctad-maybe-unsupported |
| 12 | // diagnostic for #1. |
| 13 | } |