From 124fb342e09f4e956862749f996ac6c5f769c6f7 Mon Sep 17 00:00:00 2001 From: hia3 Date: Thu, 17 Mar 2016 02:58:53 +0300 Subject: [PATCH] [MSVC] problem with BOOST_FUSION_DEFINE_STRUCT_INLINE There is a bug in MSVC that it will call non-explicit constructor of a destination type instead of calling type conversion operator of source class. BOOST_FUSION_DEFINE_STRUCT_INLINE generates a class that has non-explicit template constructor calling boost::fusion::copy. MSVC instantianes it and fails in boost::fusion::copy because boost::value_initialized is not a sequence. --- include/boost/spirit/home/x3/support/traits/value_traits.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/spirit/home/x3/support/traits/value_traits.hpp b/include/boost/spirit/home/x3/support/traits/value_traits.hpp index d28af74d3f..6f2d2c9547 100644 --- a/include/boost/spirit/home/x3/support/traits/value_traits.hpp +++ b/include/boost/spirit/home/x3/support/traits/value_traits.hpp @@ -18,7 +18,7 @@ namespace boost { namespace spirit { namespace x3 { namespace traits { static T call() { - return boost::value_initialized(); + return boost::value_initialized().data(); } }; }}}}