Ticket #8597: ticket-8597.patch
File ticket-8597.patch, 3.7 KB (added by , 9 years ago) |
---|
-
boost/spirit/home/support/utree/detail/utree_detail2.hpp
469 469 case type::int_type: 470 470 return f(x.i); 471 471 472 case type::float_type: 473 return f(x.f); 474 472 475 case type::double_type: 473 476 return f(x.d); 474 477 -
boost/spirit/home/support/utree/utree.hpp
80 80 // numeric atoms 81 81 bool_type, // An utree holding a boolean value 82 82 int_type, // An utree holding a integer (int) value 83 float_type, // An utree holding a floating point (float) value 83 84 double_type, // An utree holding a floating point (double) value 84 85 85 86 // text atoms (utf8) … … 108 109 case utree_type::function_type: { out << "function"; break; } 109 110 case utree_type::bool_type: { out << "bool"; break; } 110 111 case utree_type::int_type: { out << "int"; break; } 112 case utree_type::float_type: { out << "float"; break; } 111 113 case utree_type::double_type: { out << "double"; break; } 112 114 case utree_type::string_type: { out << "string"; break; } 113 115 case utree_type::string_range_type: { out << "string_range"; break; } … … 398 400 reference operator=(unsigned int); 399 401 reference operator=(int); 400 402 403 // This initializes a `float_type` node, which can hold arbitrary 404 // floating point (float) values. 405 utree(float); 406 reference operator=(float); 407 401 408 // This initializes a `double_type` node, which can hold arbitrary 402 409 // floating point (double) values. 403 410 utree(double); … … 598 605 detail::void_ptr v; 599 606 bool b; 600 607 int i; 608 float f; 601 609 double d; 602 610 utree* p; 603 611 function_base* pf; -
boost/spirit/home/support/utree/utree_traits.hpp
901 901 }; 902 902 903 903 template <> 904 struct compute_compatible_component_variant<utree, float> 905 : mpl::true_ 906 { 907 typedef float compatible_type; 908 909 static bool is_compatible(int d) 910 { 911 return d == utree_type::float_type; 912 } 913 }; 914 915 template <> 904 916 struct compute_compatible_component_variant<utree, double> 905 917 : mpl::true_ 906 918 { … … 1122 1134 }; 1123 1135 1124 1136 template <> 1137 struct extract_from_container<utree, float> 1138 { 1139 typedef float type; 1140 1141 template <typename Context> 1142 static type call(utree const& t, Context&) 1143 { 1144 return detail::get_or_deref<float>(t); 1145 } 1146 }; 1147 1148 template <> 1125 1149 struct extract_from_container<utree, double> 1126 1150 { 1127 1151 typedef double type; … … 1219 1243 }; 1220 1244 1221 1245 template <> 1246 struct transform_attribute<utree const, float, karma::domain> 1247 { 1248 typedef float type; 1249 1250 static type pre(utree const& t) 1251 { 1252 return detail::get_or_deref<float>(t); 1253 } 1254 }; 1255 1256 template <> 1222 1257 struct transform_attribute<utree const, double, karma::domain> 1223 1258 { 1224 1259 typedef double type;