diff --git a/include/boost/spirit/home/x3/support/numeric_utils/detail/extract_int.hpp b/include/boost/spirit/home/x3/support/numeric_utils/detail/extract_int.hpp index 73770c87d0..eeee815d8b 100644 --- a/include/boost/spirit/home/x3/support/numeric_utils/detail/extract_int.hpp +++ b/include/boost/spirit/home/x3/support/numeric_utils/detail/extract_int.hpp @@ -416,7 +416,7 @@ namespace boost { namespace spirit { namespace x3 { namespace detail { if (count == 0) // must have at least one digit return false; - attr = 0; + attr = Attribute(0); first = it; return true; } diff --git a/include/boost/spirit/home/x3/support/numeric_utils/extract_real.hpp b/include/boost/spirit/home/x3/support/numeric_utils/extract_real.hpp index fb30f02306..e08795bd3d 100644 --- a/include/boost/spirit/home/x3/support/numeric_utils/extract_real.hpp +++ b/include/boost/spirit/home/x3/support/numeric_utils/extract_real.hpp @@ -112,7 +112,7 @@ namespace boost { namespace spirit { namespace x3 { namespace extension inline bool is_equal_to_one(T const& value) { - return value == 1.0; + return value == T(1); } inline bool @@ -142,7 +142,7 @@ namespace boost { namespace spirit { namespace x3 bool neg = p.parse_sign(first, last); // Now attempt to parse an integer - T n = 0; + T n(0); bool got_a_number = p.parse_n(first, last, n); // If we did not get a number it might be a NaN, Inf or a leading