[assign] Boost.Assign is incompatible with std::initializer_list

Hi Boost devs,
Our testing has discovered an apparent incompatibility between Boost.Assign and std::initializer_list. I'm using Boost 1.55.0 and a build somewhat newer than VC 2013 RTM (I could check with RTM if someone really wanted me to):
C:\Temp>type meow.cpp
#include <set>
#include

Is this a known issue? (It should repro for other platforms, although I haven't checked.)
I dont know how much of this is a largely known issue, but this a problem on C++11 compilers(such as gcc or clang) that I have seen when I was using Boost.Assign on both C++11 compilers and MSVC. I always had to use workarounds to get it work on C++11(which Boost.Assign was already a workaround for MSVC).
Should this conversion operator be constrained so it can't be instantiated for initializer_list?
Yes, ideally, the conversion operator should use default template parameters to exclude initializer lists on compilers that support this. I dont know if VS 2013 supports default template parameters for functions, or not. Thanks, Paul -- View this message in context: http://boost.2283326.n4.nabble.com/assign-Boost-Assign-is-incompatible-with-... Sent from the Boost - Dev mailing list archive at Nabble.com.

[pfultz2]
I dont know how much of this is a largely known issue, but this a problem on C++11 compilers(such as gcc or clang) that I have seen when I was using Boost.Assign on both C++11 compilers and MSVC. I always had to use workarounds to get it work on C++11(which Boost.Assign was already a workaround for MSVC).
Good to know.
Yes, ideally, the conversion operator should use default template parameters to exclude initializer lists on compilers that support this. I dont know if VS 2013 supports default template parameters for functions, or not.
VS 2013 RTM supports default template arguments for function templates. See http://blogs.msdn.com/b/vcblog/archive/2013/12/02/c-11-14-core-language-feat... for my pretty table. Thanks, STL
participants (2)
-
pfultz2
-
Stephan T. Lavavej