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]
This commit is contained in:
Daniel James
2009-05-22 06:01:19 +00:00
parent e52c15df4e
commit 6b49fd3d49

View File

@@ -153,12 +153,26 @@ namespace boost {
// Is there is, this is a function object that will call that overload // Is there is, this is a function object that will call that overload
template <typename Float> template <typename Float>
struct call_ldexp : select_impl struct call_ldexp;
:: BOOST_NESTED_TEMPLATE x<Float, detect::ldexp_access>::type
:: BOOST_NESTED_TEMPLATE x<Float, detect::ldexpf_access>::type template <>
:: BOOST_NESTED_TEMPLATE x<Float, detect::ldexpl_access>::type struct call_ldexp<float> : select_impl
:: x<float, detect::ldexp_access>::type
:: x<float, detect::ldexpf_access>::type
:: 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
// //
// call_frexp::value = Is there an appropriate version of 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 // Is there is, this is a function object that will call that overload
template <typename Float> template <typename Float>
struct call_frexp : select_impl struct call_frexp;
:: BOOST_NESTED_TEMPLATE x<Float, detect::frexp_access>::type
:: BOOST_NESTED_TEMPLATE x<Float, detect::frexpf_access>::type template <>
:: BOOST_NESTED_TEMPLATE x<Float, detect::frexpl_access>::type 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 {}; :: type {};
// has_float_functions // has_float_functions