From 0757f0bbf3edf43a27ec3f7d2c33ab56f26eb15a Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Mon, 20 Jan 2020 11:17:19 +0100 Subject: [PATCH] Add testcase of PR c++/92536, already fixed. PR c++/92536 * g++.dg/cpp1z/pr92536.C: New. --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp1z/pr92536.C | 23 +++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp1z/pr92536.C 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); +} -- 2.30.2