instantiate_all.cpp 1.1 KB

12345678910111213141516171819202122232425262728293031
  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. // MSVC-7.1 has a problem with our tests: sometimes when a
  7. // function is used via a function pointer, it does *not*
  8. // instantiate the template, leading to unresolved externals
  9. // at link time. Therefore we create a small library that
  10. // instantiates "everything", and link all our tests against
  11. // it for msvc-7.1 only. Note that due to some BBv2 limitations
  12. // we can not place this in a sub-folder of the test directory
  13. // as that would lead to recursive project dependencies...
  14. //
  15. #define BOOST_MATH_ASSERT_UNDEFINED_POLICY false
  16. #define BOOST_MATH_INSTANTIATE_MINIMUM
  17. #include <boost/math/concepts/real_concept.hpp>
  18. #include "../test/compile_test/instantiate.hpp"
  19. void some_proc()
  20. {
  21. instantiate(float(0));
  22. instantiate(double(0));
  23. instantiate(static_cast<long double>(0));
  24. instantiate(static_cast<boost::math::concepts::real_concept>(0));
  25. }