From: Paolo Carlini Date: Mon, 20 Jan 2020 10:17:19 +0000 (+0100) Subject: Add testcase of PR c++/92536, already fixed. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0757f0bbf3edf43a27ec3f7d2c33ab56f26eb15a;p=gcc.git Add testcase of PR c++/92536, already fixed. PR c++/92536 * g++.dg/cpp1z/pr92536.C: New. --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index cae0c163e39..888f2cddb02 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2020-01-20 Paolo Carlini + + PR c++/92536 + * g++.dg/cpp1z/pr92536.C: New. + 2020-01-20 Richard Biener PR tree-optimization/93094 diff --git a/gcc/testsuite/g++.dg/cpp1z/pr92536.C b/gcc/testsuite/g++.dg/cpp1z/pr92536.C new file mode 100644 index 00000000000..035c7694de9 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1z/pr92536.C @@ -0,0 +1,23 @@ +// { dg-do compile { target c++17 } } + +namespace std +{ + struct stop_token { }; + + template + struct stop_callback + { + template + stop_callback(stop_token, C&&) { } + }; + +template + stop_callback(stop_token, _Callback) -> stop_callback<_Callback>; +} + +int main() +{ + std::stop_token tok; + std::function f([](){}); // { dg-error "not a member|not declared" } + std::stop_callback cb(tok, f); +}