Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/initlist82.C

raw
1 // PR c++/60708
2 // { dg-do compile { target c++11 } }
3
4 template <class T, class U> struct mypair {
5 mypair(T, U) {}
6 };
7
8 template<typename T> struct S {
9 mypair<T *, int> get_pair() noexcept {
10 return mypair<T*,int>(nullptr, 0);
11 }
12 };
13
14 static void foo(const mypair<char *, int> (&a)[2]) noexcept { }
15
16 int main()
17 {
18 S<char> s;
19 foo({s.get_pair(), s.get_pair()});
20 }