This is a more correct testcase, which also preserves the property of OT that -pedantic works around the issue. Note: removing the string constructor taking an initializer_list also works around the problem:
///////////////////
#include <initializer_list>
namespace std { template<typename _Key> struct set { void insert(const _Key&); void insert(initializer_list<_Key>); };
struct string { string(const string&, __SIZE_TYPE__, __SIZE_TYPE__ = -1); string(const char*); string(initializer_list<char>); }; }
int main() { std::set<std::string> s; s.insert( { "abc", "def", "hij"} ); }
This is a more correct testcase, which also preserves the property of OT that -pedantic works around the issue. Note: removing the string constructor taking an initializer_list also works around the problem:
///////////////////
#include <initializer_list>
namespace std initializer_ list<_Key> );
{
template<typename _Key>
struct set
{
void insert(const _Key&);
void insert(
};
struct string initializer_ list<char> );
{
string(const string&, __SIZE_TYPE__, __SIZE_TYPE__ = -1);
string(const char*);
string(
};
}
int main() set<std: :string> s;
{
std::
s.insert( { "abc", "def", "hij"} );
}