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 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