Ticket #5491: functional.patch
File functional.patch, 1.7 KB (added by , 12 years ago) |
---|
-
boost/accumulators/numeric/functional.hpp
10 10 11 11 #include <limits> 12 12 #include <functional> 13 #include <boost/static_assert.hpp> 13 14 #include <boost/mpl/if.hpp> 14 15 #include <boost/mpl/and.hpp> 15 16 #include <boost/type_traits/remove_const.hpp> … … 277 278 struct as_min_base 278 279 : std::unary_function<Arg, typename remove_const<Arg>::type> 279 280 { 281 BOOST_STATIC_ASSERT(std::numeric_limits<typename remove_const<Arg>::type>::is_specialized); 282 280 283 typename remove_const<Arg>::type operator ()(Arg &) const 281 284 { 282 285 return (std::numeric_limits<typename remove_const<Arg>::type>::min)(); … … 287 290 struct as_min_base<Arg, typename enable_if<is_floating_point<Arg> >::type> 288 291 : std::unary_function<Arg, typename remove_const<Arg>::type> 289 292 { 293 BOOST_STATIC_ASSERT(std::numeric_limits<typename remove_const<Arg>::type>::is_specialized); 294 290 295 typename remove_const<Arg>::type operator ()(Arg &) const 291 296 { 292 297 return -(std::numeric_limits<typename remove_const<Arg>::type>::max)(); … … 297 302 struct as_max_base 298 303 : std::unary_function<Arg, typename remove_const<Arg>::type> 299 304 { 305 BOOST_STATIC_ASSERT(std::numeric_limits<typename remove_const<Arg>::type>::is_specialized); 306 300 307 typename remove_const<Arg>::type operator ()(Arg &) const 301 308 { 302 309 return (std::numeric_limits<typename remove_const<Arg>::type>::max)();