diff --git a/include/boost/functional/hash/detail/float_functions.hpp b/include/boost/functional/hash/detail/float_functions.hpp index df18a84..60dbb2a 100644 --- a/include/boost/functional/hash/detail/float_functions.hpp +++ b/include/boost/functional/hash/detail/float_functions.hpp @@ -117,42 +117,44 @@ namespace boost { \ BOOST_STATIC_CONSTANT(bool, c99 = \ sizeof(float_type(c99_func(x,y))) \ == sizeof(is)); \ + }; \ + \ + template \ + struct call_c99 : \ + boost::hash_detail::call_##cpp_func {}; \ + \ + template <> \ + struct call_c99 { \ + typedef type1 float_type; \ + \ + template \ + inline type1 operator()(type1 a, T b) const \ + { \ + return c99_func(a, b); \ + } \ + }; \ + \ + template \ + struct call_cpp : \ + call_c99< \ + ::boost::hash_detail::c99_func##_detect::check::c99 \ + > {}; \ + \ + template <> \ + struct call_cpp { \ + typedef type1 float_type; \ + \ + template \ + inline type1 operator()(type1 a, T b) const \ + { \ + return cpp_func(a, b); \ + } \ }; \ } \ \ - template \ - struct call_##c99_func##_c99 : \ - call_##cpp_func {}; \ - \ - template <> \ - struct call_##c99_func##_c99 { \ - typedef type1 float_type; \ - \ - inline type1 operator()(type1 a, type2 b) const \ - { \ - return c99_func(a, b); \ - } \ - }; \ - \ - template \ - struct call_##c99_func##_cpp : \ - call_##c99_func##_c99< \ - ::boost::hash_detail::c99_func##_detect::check::c99 \ - > {}; \ - \ - template <> \ - struct call_##c99_func##_cpp { \ - typedef type1 float_type; \ - \ - inline type1 operator()(type1 a, type2 b) const \ - { \ - return cpp_func(a, b); \ - } \ - }; \ - \ template <> \ struct call_##cpp_func : \ - call_##c99_func##_cpp< \ + c99_func##_detect::call_cpp< \ ::boost::hash_detail::c99_func##_detect::check::cpp \ > {}; \ } \