compl_abs_incl_test.cpp 956 B

12345678910111213141516171819202122232425262728
  1. // Copyright John Maddock 2006.
  2. // Use, modification and distribution are subject to the
  3. // Boost Software License, Version 1.0. (See accompanying file
  4. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. //
  6. // Basic sanity check that header <boost/math/complex/fabs.hpp>
  7. // #includes all the files that it needs to.
  8. //
  9. #include <boost/math/complex/fabs.hpp>
  10. inline void check_result_imp(std::complex<float>, std::complex<float>){}
  11. inline void check_result_imp(std::complex<double>, std::complex<double>){}
  12. inline void check_result_imp(std::complex<long double>, std::complex<long double>){}
  13. #include "test_compile_result.hpp"
  14. void compile_and_link_test()
  15. {
  16. check_result<float >(boost::math::fabs(std::complex<float>()));
  17. check_result<double >(boost::math::fabs(std::complex<double>()));
  18. #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
  19. check_result<long double>(boost::math::fabs(std::complex<long double>()));
  20. #endif
  21. }