re PR c++/89315 (Cannot convert to std::initializer_list - fails with gcc9 works with gcc8)
PR c++/89315 * g++.dg/cpp0x/initlist114.C: New test. From-SVN: r268971
This commit is contained in:
parent
feb0dcfede
commit
35d7b5284e
@ -5,6 +5,9 @@
|
||||
|
||||
* g++.old-deja/g++.robertl/eb82.C: Tweak dg-error.
|
||||
|
||||
PR c++/89315
|
||||
* g++.dg/cpp0x/initlist114.C: New test.
|
||||
|
||||
2019-02-16 David Malcolm <dmalcolm@redhat.com>
|
||||
|
||||
PR c++/88680
|
||||
|
21
gcc/testsuite/g++.dg/cpp0x/initlist114.C
Normal file
21
gcc/testsuite/g++.dg/cpp0x/initlist114.C
Normal file
@ -0,0 +1,21 @@
|
||||
// PR c++/89315
|
||||
// { dg-do compile { target c++11 } }
|
||||
|
||||
#include <initializer_list>
|
||||
|
||||
struct bar {
|
||||
bar(std::initializer_list<int>, int = int());
|
||||
};
|
||||
|
||||
struct i {
|
||||
const bar & invitees;
|
||||
};
|
||||
|
||||
template <typename = void> struct n {
|
||||
public:
|
||||
void m_fn1() { i{{}}; }
|
||||
};
|
||||
|
||||
struct o : n<> {
|
||||
void p() { m_fn1(); }
|
||||
};
|
Loading…
Reference in New Issue
Block a user