|
Boost : |
Subject: Re: [boost] [unordered] Visual C++ 2013 initializer_listoverloadfailure.
From: Daniel James (daniel_at_[hidden])
Date: 2013-11-05 11:41:03
On 5 November 2013 16:32, Stephan T. Lavavej <stl_at_[hidden]> wrote:
>
> I need a self-contained repro in order to file a compiler bug. I am aware of DevDiv#796414 "Overloading op+=(char) and op+=(initializer_list<char>) should be unambiguous" which is still active.
This is the example from the start of the thread which was confirmed
to fail on Visual C++. I don't know how to find out about
"DevDiv#796414" so I don't know if it's the same issue.
#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");
x.insert({"a"});
x.insert({"a", "b"});
}
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk