I just got caught by this seemingly innocent attempt to call the std::string constructor that takes a size and a character value, using uniform initialization syntax:
std::string s{ 10, '\0' };
I thought this would create a string with the length of 10, initialized with \0.
Though it actually calls the constructor that takes an initializer list and thus creates a string with the length of 2, initialized with {'\n', '\0'}!
See demo at Coliru.
Is there a way to avoid this pitfall when using uniform initialization? Or do I just have to be careful?
Note: Similar question has been asked before, but no answer was given on how to avoid that pitfall.

TypeName(initializer_list<SomeType>);), then it takes priority over other forms of construction, provided that the initializer list conforms to the sequence constructor's type."[over.match.list]/1; basically; constructors are looked up in two phases and if any initializer-list constructors exist at all then that's what you get, for better or for worse.