1 2 // Copyright 2006-2009 Daniel James. 3 // Distributed under the Boost Software License, Version 1.0. (See accompanying 4 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 6 // This test just makes sure a header which uses hash_fwd can compile without 7 // the main hash headers. 8 9 #include "./config.hpp" 10 11 #if !defined(BOOST_HASH_TEST_EXTENSIONS) || defined(BOOST_HASH_TEST_STD_INCLUDES) 12 main()13int main() {} 14 15 #else 16 17 #include "./hash_fwd_test.hpp" 18 #include <boost/core/lightweight_test.hpp> 19 unused(T const &)20template <class T> void unused(T const&) {} 21 fwd_test()22void fwd_test() 23 { 24 test::test_type1<int> x1(3); 25 test::test_type1<std::string> y1("Black"); 26 test::test_type2<int> x2(25, 16); 27 test::test_type2<std::string> y2("White", "Green"); 28 29 std::vector<int> empty; 30 std::vector<std::string> empty2; 31 32 test::test_type3<int> x3(empty.begin(), empty.end()); 33 test::test_type3<std::string> y3(empty2.begin(), empty2.end()); 34 35 // Prevent gcc warnings: 36 unused(x1); unused(x2); unused(x3); 37 unused(y1); unused(y2); unused(y3); 38 } 39 main()40int main() 41 { 42 fwd_test(); 43 44 return boost::report_errors(); 45 } 46 47 #endif // defined(BOOST_HASH_TEST_EXTENSIONS) && !defined(BOOST_HASH_TEST_STD_INCLUDES) 48