blob: f215b9d79323b4401895902a1108a95900ab7408 [file] [log] [blame]
// PR c++/57196
// { dg-require-effective-target c++11 }
#include <initializer_list>
template<class T>
struct set {
set() = default;
set(std::initializer_list<T>){}
};
struct string {
string(const char*){}
~string(){}
};
typedef decltype(sizeof(0)) size_t;
template <size_t> struct EqHelper { };
int IsNullLiteralHelper(...);
void Fn() {
EqHelper<sizeof IsNullLiteralHelper(set<int>{1})> eq1; // ok
EqHelper<sizeof IsNullLiteralHelper(set<string>())> eq2; // ok
EqHelper<sizeof IsNullLiteralHelper(set<string>{"foo"})> eq3; // error
}