// Copyright 2012 Daniel James. // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #include #include #include #include namespace test { template struct check_return_type { template static void equals(T2) { BOOST_STATIC_ASSERT((boost::is_same::value)); } template static void equals_ref(T2&) { BOOST_STATIC_ASSERT((boost::is_same::value)); } template static void convertible(T2) { BOOST_STATIC_ASSERT((boost::is_convertible::value)); } }; } int main() { float f = 0; double d = 0; long double l = 0; test::check_return_type::equals(std::ldexp(f, 0)); test::check_return_type::equals(std::ldexp(d, 0)); test::check_return_type::equals(std::ldexp(l, 0)); int dummy = 0; test::check_return_type::equals(std::frexp(f, &dummy)); test::check_return_type::equals(std::frexp(d, &dummy)); test::check_return_type::equals(std::frexp(l, &dummy)); #if BOOST_HASH_USE_FPCLASSIFY int (*fpc1)(float) = std::fpclassify; int (*fpc2)(double) = std::fpclassify; int (*fpc3)(long double) = std::fpclassify; #endif }