lundi 2 novembre 2015

C++11 Uniform Initialization and function overloading

Simple program:

void f(const std::string& s);
void f(const char* p);
f({});

Why clang calls f((const char*)nullptr)? I've expected compiler warning about ambiguous call.

Aucun commentaire:

Enregistrer un commentaire