From 6b49fd3d49f129ad04e816ad4cb2896ad802473d Mon Sep 17 00:00:00 2001 From: Daniel James Date: Fri, 22 May 2009 06:01:19 +0000 Subject: [PATCH] Spell out exactly which functions can be used with which types. I was hitting some ambiguity errors when the function was for the wrong type. [SVN r53168] --- .../hash/detail/float_functions.hpp | 43 +++++++++++++++---- 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/include/boost/functional/hash/detail/float_functions.hpp b/include/boost/functional/hash/detail/float_functions.hpp index 7ab7079..6f21169 100644 --- a/include/boost/functional/hash/detail/float_functions.hpp +++ b/include/boost/functional/hash/detail/float_functions.hpp @@ -153,12 +153,26 @@ namespace boost { // Is there is, this is a function object that will call that overload template - struct call_ldexp : select_impl - :: BOOST_NESTED_TEMPLATE x::type - :: BOOST_NESTED_TEMPLATE x::type - :: BOOST_NESTED_TEMPLATE x::type + struct call_ldexp; + + template <> + struct call_ldexp : select_impl + :: x::type + :: x::type :: type {}; + template <> + struct call_ldexp : select_impl + :: x::type + :: type {}; + + template <> + struct call_ldexp : select_impl + :: x::type + :: x::type + :: type {}; + + // call_frexp // // call_frexp::value = Is there an appropriate version of call_frexp @@ -166,10 +180,23 @@ namespace boost { // Is there is, this is a function object that will call that overload template - struct call_frexp : select_impl - :: BOOST_NESTED_TEMPLATE x::type - :: BOOST_NESTED_TEMPLATE x::type - :: BOOST_NESTED_TEMPLATE x::type + struct call_frexp; + + template <> + struct call_frexp : select_impl + :: x::type + :: x::type + :: type {}; + + template <> + struct call_frexp : select_impl + :: x::type + :: type {}; + + template <> + struct call_frexp : select_impl + :: x::type + :: x::type :: type {}; // has_float_functions