Boost logo

Boost :

Subject: [boost] [unordered] Visual C++ 2013 initializer_list overload failure.
From: Daniel James (daniel_at_[hidden])
Date: 2013-10-19 12:48:01


I'm getting some test failures for inserting an initializer_list into
the unordered containers:

I don't have access to Visual C++ 12 to investigate this. This is just
a guess, but I think the problem is converting an initializer_list of
string literals to an initializer list of std::string. This works okay
with clang and g++ so I assume it's allowed. A minimal test might be
something like the following (although it might not).

#include <initializer_list>
#include <string>

template <typename T>
struct thing
    void insert(T const&) {}
    void insert(T&&) {}
    void insert(std::initializer_list<T>) {}

int main() {
    thing<std::string> x;
    x.insert({"a", "b"});

Boost list run by bdawes at, gregod at, cpdaniel at, john at