[fusion] C arrays in fusion::vector
msvc9+fusion 1.40 reject this:
fusion::vector
Jean-Louis Leroy schrieb:
msvc9+fusion 1.40 reject this:
fusion::vector
v; 1>C:\Users\JLL\Documents\Visual Studio 2008\Projects\boost_1_40_0\boost/fusion/container/vector/detail/vector_n.hpp(43) : error C2440: '<function-style-cast>' : cannot convert from 'int' to 'char [20]' 1> There are no conversions to array types, although there are conversions to references or pointers to arrays 1> C:\Users\JLL\Documents\Visual Studio 2008\Projects\boost_1_40_0\boost/fusion/container/vector/detail/vector_n.hpp(42) : while compiling class template member function 'boost::fusion::vector_data2
::vector_data2(void)' 1> with 1> [ 1> Derived=boost::fusion::vector2 , 1> T0=int, 1> T1=char [20] 1> ] Am I doing something wrong ?
Anyway I can wrap the C array in a class (template)...
Thanks, J-L
That's because fusion containers internally initialize their elements in the default constructor via e0(T0()),...eN-1(TN-1()). I consider this to be a bug, fusion containers should initialize their elements analogue to std::pair and std::tuple simply via m0(),...mN-1(). -Christopher
Christopher Schmidt wrote:
That's because fusion containers internally initialize their elements in the default constructor via e0(T0()),...eN-1(TN-1()). I consider this to be a bug, fusion containers should initialize their elements analogue to std::pair and std::tuple simply via m0(),...mN-1().
Fixed. I'll commit after I run the tests. Thanks! Regards, -- Joel de Guzman http://www.boostpro.com http://spirit.sf.net http://www.facebook.com/djowel Meet me at BoostCon http://www.boostcon.com/home http://www.facebook.com/boostcon
participants (3)
-
Christopher Schmidt
-
Jean-Louis Leroy
-
Joel de Guzman