2006-03-18 15:49:21 +00:00
|
|
|
|
2009-03-09 20:56:23 +00:00
|
|
|
// Copyright 2006-2009 Daniel James.
|
2007-08-24 01:05:36 +00:00
|
|
|
// 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)
|
2006-02-05 16:06:31 +00:00
|
|
|
|
|
|
|
|
// This test just makes sure a header which uses hash_fwd can compile without
|
|
|
|
|
// the main hash headers.
|
|
|
|
|
|
2009-11-26 23:15:30 +00:00
|
|
|
#include "./config.hpp"
|
|
|
|
|
|
2012-12-17 23:37:56 +00:00
|
|
|
#if !defined(BOOST_HASH_TEST_EXTENSIONS) || defined(BOOST_HASH_TEST_STD_INCLUDES)
|
2009-06-21 09:42:40 +00:00
|
|
|
|
|
|
|
|
int main() {}
|
|
|
|
|
|
|
|
|
|
#else
|
2006-02-05 16:06:31 +00:00
|
|
|
|
2009-06-21 09:42:40 +00:00
|
|
|
#include "./hash_fwd_test.hpp"
|
2017-12-19 17:48:18 +00:00
|
|
|
#include <boost/core/lightweight_test.hpp>
|
2006-02-05 16:06:31 +00:00
|
|
|
|
|
|
|
|
template <class T> void unused(T const&) {}
|
|
|
|
|
|
2006-02-09 19:16:08 +00:00
|
|
|
void fwd_test()
|
2006-02-05 16:06:31 +00:00
|
|
|
{
|
2006-02-07 00:48:58 +00:00
|
|
|
test::test_type1<int> x1(3);
|
|
|
|
|
test::test_type1<std::string> y1("Black");
|
|
|
|
|
test::test_type2<int> x2(25, 16);
|
|
|
|
|
test::test_type2<std::string> y2("White", "Green");
|
2006-02-05 16:06:31 +00:00
|
|
|
|
|
|
|
|
std::vector<int> empty;
|
|
|
|
|
std::vector<std::string> empty2;
|
|
|
|
|
|
2006-02-07 00:48:58 +00:00
|
|
|
test::test_type3<int> x3(empty.begin(), empty.end());
|
|
|
|
|
test::test_type3<std::string> y3(empty2.begin(), empty2.end());
|
2006-02-05 16:06:31 +00:00
|
|
|
|
|
|
|
|
// Prevent gcc warnings:
|
|
|
|
|
unused(x1); unused(x2); unused(x3);
|
|
|
|
|
unused(y1); unused(y2); unused(y3);
|
|
|
|
|
}
|
2006-02-09 19:16:08 +00:00
|
|
|
|
2008-07-18 12:31:18 +00:00
|
|
|
int main()
|
2006-02-09 19:16:08 +00:00
|
|
|
{
|
|
|
|
|
fwd_test();
|
2009-06-21 09:42:40 +00:00
|
|
|
|
2008-07-18 12:31:18 +00:00
|
|
|
return boost::report_errors();
|
2006-02-09 19:16:08 +00:00
|
|
|
}
|
|
|
|
|
|
2012-12-17 23:37:56 +00:00
|
|
|
#endif // defined(BOOST_HASH_TEST_EXTENSIONS) && !defined(BOOST_HASH_TEST_STD_INCLUDES)
|