|
Boost : |
Subject: Re: [boost] [unordered] Visual C++ 2013 initializer_listoverloadfailure.
From: Glen Fernandes (glen.fernandes_at_[hidden])
Date: 2013-11-05 14:21:44
Stephan, I seem to recall providing a slightly similar example that
you added as repro to DevDiv#532674 when you renamed it "[Milan]
initializer_list overloading" on 2012/11/29.
Glen
On Tue, Nov 5, 2013 at 8:41 AM, Daniel James <daniel_at_[hidden]> wrote:
> 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"});
> }
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk