Why are the first two calls to doSomething OK by the compiler, but using two elements in the list causes an ambiguous call?
#include
Both the one-argument and three-argument lists can only match std::vector's std::initializer_list constructor. However, the two-argument list matches one of the constructors from std::vector:
template
vector(InputIt first, InputIt last, Allocator const &alloc = Allocator());
Indeed, a char const * can be incremented, and dereferenced to get a char that is implicitly convertible to an int.