diff options
author | Andrew Pinski <apinski@marvell.com> | 2022-01-04 02:53:47 +0000 |
---|---|---|
committer | Andrew Pinski <apinski@marvell.com> | 2022-01-04 02:59:58 +0000 |
commit | d4b710a31dc854970ab501f2d3bad7d69fe7f083 (patch) | |
tree | 3626c140dc8f15dc3cfe1a726975be5acccde43a | |
parent | 43359148b252b9501b0b570b8d48d02fb301b6c8 (diff) | |
download | gcc-d4b710a31dc854970ab501f2d3bad7d69fe7f083.zip gcc-d4b710a31dc854970ab501f2d3bad7d69fe7f083.tar.gz gcc-d4b710a31dc854970ab501f2d3bad7d69fe7f083.tar.bz2 |
[COMMITTED] c++: [PR90782] Add testcase
This testcase was fixed by r12-1744-g3eecc1 as it make
sense it fixed a few other class deduction issues.
So I thought I would add a testcase for this PR and close
it as fixed.
Committed after a quick test of the testcase.
PR c++/90782
gcc/testsuite/ChangeLog:
* g++.dg/cpp1z/class-deduction100.C: New test.
-rw-r--r-- | gcc/testsuite/g++.dg/cpp1z/class-deduction100.C | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp1z/class-deduction100.C b/gcc/testsuite/g++.dg/cpp1z/class-deduction100.C new file mode 100644 index 0000000..9fa307f --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1z/class-deduction100.C @@ -0,0 +1,13 @@ +// PR c++/90782 +// { dg-do compile { target c++17 } } + +template<class... A> +struct bar { + template<class B> + bar(B& obj, void(B::*f)(A...)const=&B::operator()){} +}; +int main() { + const auto f1 = [](){}; + bar f8(f1); +} + |