PR c++/81486 - CTAD failing with ().

* g++.dg/cpp1z/class-deduction60.C: New test.
	* g++.dg/cpp1z/class-deduction61.C: New test.

From-SVN: r267535
This commit is contained in:
Marek Polacek 2019-01-02 22:39:16 +00:00 committed by Marek Polacek
parent 29bb9224fc
commit fbf3e66ffc
3 changed files with 38 additions and 0 deletions

View File

@ -6,6 +6,10 @@
PR c++/88631 - CTAD failing for value-initialization.
* g++.dg/cpp1z/class-deduction59.C: New test.
PR c++/81486 - CTAD failing with ().
* g++.dg/cpp1z/class-deduction60.C: New test.
* g++.dg/cpp1z/class-deduction61.C: New test.
2019-01-02 Martin Sebor <msebor@redhat.com>
Jeff Law <law@redhat.com>

View File

@ -0,0 +1,19 @@
// PR c++/81486
// { dg-do compile { target c++17 } }
template <class T>
struct C {
C(T);
};
template <>
struct C<void> { };
C() -> C<void>;
int
main()
{
auto a = C{};
auto b = C();
}

View File

@ -0,0 +1,15 @@
// PR c++/81486
// { dg-do compile { target c++17 } }
template <typename... Ts>
struct foo
{
template <typename... Us>
foo(Us...) { }
};
int
main ()
{
auto f = foo();
}