From f5615c1afc8ccfc1fbfddd8dc9b3de211bfc5206 Mon Sep 17 00:00:00 2001 From: tobias-loew Date: Thu, 13 Aug 2015 09:39:04 +0200 Subject: [PATCH 1/2] fixed 1.59.0 rc3: compiler warnings in real_impl.hpp explicit type conversions & static_cast to avoid compiler warning warning C4244: '=' : conversion from 'unsigned __int64' to 'double', possible loss of data in real_impl.hpp --- include/boost/spirit/home/qi/numeric/detail/real_impl.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/boost/spirit/home/qi/numeric/detail/real_impl.hpp b/include/boost/spirit/home/qi/numeric/detail/real_impl.hpp index 913c771946..948481895e 100644 --- a/include/boost/spirit/home/qi/numeric/detail/real_impl.hpp +++ b/include/boost/spirit/home/qi/numeric/detail/real_impl.hpp @@ -284,7 +284,7 @@ namespace boost { namespace spirit { namespace qi { namespace detail // If there is no number, disregard the exponent altogether. // by resetting 'first' prior to the exponent prefix (e|E) first = e_pos; - n = acc_n; + n = T(acc_n); } } else if (frac_digits) @@ -306,11 +306,11 @@ namespace boost { namespace spirit { namespace qi { namespace detail return true; // got a NaN or Inf, return immediately } - n = acc_n; + n = T(acc_n); } else { - n = acc_n; + n = T(acc_n); } // If we got a negative sign, negate the number From 453232881230510d4ac091922dac01a0dd080345 Mon Sep 17 00:00:00 2001 From: tobias-loew Date: Mon, 31 Aug 2015 09:51:55 +0200 Subject: [PATCH 2/2] reenabled support for BOOST_FUSION_ADAPT_ADT adapted structs since commit 69cc5370381e48352dc01c708599e9b49b7460f0 (hkaiser hkaiser authored on 7 Nov 2009) spirit support BOOST_FUSION_ADAPT_ADT adapted structs was broken --- include/boost/spirit/home/qi/detail/assign_to.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/boost/spirit/home/qi/detail/assign_to.hpp b/include/boost/spirit/home/qi/detail/assign_to.hpp index 38142bf1b3..f7bc86c07a 100644 --- a/include/boost/spirit/home/qi/detail/assign_to.hpp +++ b/include/boost/spirit/home/qi/detail/assign_to.hpp @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -203,6 +204,16 @@ namespace boost { namespace spirit { namespace traits } }; + template + struct assign_to_attribute_from_value, T> + { + static void + call(typename T const& val, typename fusion::extension::adt_attribute_proxy& attr) + { + attr = val; + } + }; + namespace detail { template