|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r53168 - trunk/boost/functional/hash/detail
From: daniel_james_at_[hidden]
Date: 2009-05-22 02:01:20
Author: danieljames
Date: 2009-05-22 02:01:19 EDT (Fri, 22 May 2009)
New Revision: 53168
URL: http://svn.boost.org/trac/boost/changeset/53168
Log:
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.
Text files modified:
trunk/boost/functional/hash/detail/float_functions.hpp | 43 ++++++++++++++++++++++++++++++++-------
1 files changed, 35 insertions(+), 8 deletions(-)
Modified: trunk/boost/functional/hash/detail/float_functions.hpp
==============================================================================
--- trunk/boost/functional/hash/detail/float_functions.hpp (original)
+++ trunk/boost/functional/hash/detail/float_functions.hpp 2009-05-22 02:01:19 EDT (Fri, 22 May 2009)
@@ -153,12 +153,26 @@
// Is there is, this is a function object that will call that overload
template <typename Float>
- struct call_ldexp : select_impl
- :: BOOST_NESTED_TEMPLATE x<Float, detect::ldexp_access>::type
- :: BOOST_NESTED_TEMPLATE x<Float, detect::ldexpf_access>::type
- :: BOOST_NESTED_TEMPLATE x<Float, detect::ldexpl_access>::type
+ struct call_ldexp;
+
+ template <>
+ struct call_ldexp<float> : select_impl
+ :: x<float, detect::ldexp_access>::type
+ :: x<float, detect::ldexpf_access>::type
+ :: type {};
+
+ template <>
+ struct call_ldexp<double> : select_impl
+ :: x<double, detect::ldexp_access>::type
:: type {};
+ template <>
+ struct call_ldexp<long double> : select_impl
+ :: x<long double, detect::ldexp_access>::type
+ :: x<long double, detect::ldexpl_access>::type
+ :: type {};
+
+
// call_frexp
//
// call_frexp::value = Is there an appropriate version of call_frexp
@@ -166,10 +180,23 @@
// Is there is, this is a function object that will call that overload
template <typename Float>
- struct call_frexp : select_impl
- :: BOOST_NESTED_TEMPLATE x<Float, detect::frexp_access>::type
- :: BOOST_NESTED_TEMPLATE x<Float, detect::frexpf_access>::type
- :: BOOST_NESTED_TEMPLATE x<Float, detect::frexpl_access>::type
+ struct call_frexp;
+
+ template <>
+ struct call_frexp<float> : select_impl
+ :: x<float, detect::frexp_access>::type
+ :: x<float, detect::frexpf_access>::type
+ :: type {};
+
+ template <>
+ struct call_frexp<double> : select_impl
+ :: x<double, detect::frexp_access>::type
+ :: type {};
+
+ template <>
+ struct call_frexp<long double> : select_impl
+ :: x<long double, detect::frexp_access>::type
+ :: x<long double, detect::frexpl_access>::type
:: type {};
// has_float_functions
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk