Changed header include form so that it won't break bjam dependency analysis anymore.

[SVN r20636]
This commit is contained in:
John Maddock
2003-11-04 11:32:42 +00:00
parent 8ed1eb51be
commit 5e66227e35
53 changed files with 287 additions and 80 deletions

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_type.hpp"
#include TYPE_TRANSFORM(add_const)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/add_const.hpp>
#endif
BOOST_DECL_TRANSFORM_TEST(add_const_test_1, ::boost::add_const, const, const)
BOOST_DECL_TRANSFORM_TEST(add_const_test_2, ::boost::add_const, volatile, volatile const)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_type.hpp"
#include TYPE_TRANSFORM(add_pointer)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/add_pointer.hpp>
#endif
BOOST_DECL_TRANSFORM_TEST(add_pointer_test_1, ::boost::add_pointer, const, const*)
BOOST_DECL_TRANSFORM_TEST(add_pointer_test_2, ::boost::add_pointer, volatile, volatile*)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_type.hpp"
#include TYPE_TRANSFORM(add_reference)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/add_reference.hpp>
#endif
BOOST_DECL_TRANSFORM_TEST(add_reference_test_1, ::boost::add_reference, const, const&)
BOOST_DECL_TRANSFORM_TEST(add_reference_test_2, ::boost::add_reference, volatile, volatile&)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_type.hpp"
#include TYPE_TRANSFORM(add_volatile)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/add_volatile.hpp>
#endif
BOOST_DECL_TRANSFORM_TEST(add_volatile_test_1, ::boost::add_volatile, const, const volatile)
BOOST_DECL_TRANSFORM_TEST(add_volatile_test_2, ::boost::add_volatile, volatile, volatile)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_TRAITS(alignment_of)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/alignment_of.hpp>
#endif
//
// VC++ emits an awful lot of warnings unless we define these:

View File

@@ -7,7 +7,11 @@
#include "test.hpp"
#include "check_type.hpp"
#include "check_integral_constant.hpp"
#include TYPE_TRAITS(function_traits)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/function_traits.hpp>
#endif
typedef void(pf_zero1)();
typedef int(pf_zero2)();

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_TRAITS(has_nothrow_assign)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/has_nothrow_assign.hpp>
#endif
TT_TEST_BEGIN(has_nothrow_assign)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_TRAITS(has_nothrow_constructor)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/has_nothrow_constructor.hpp>
#endif
TT_TEST_BEGIN(has_nothrow_constructor)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_TRAITS(has_nothrow_copy)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/has_nothrow_copy.hpp>
#endif
TT_TEST_BEGIN(has_nothrow_copy)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_TRAITS(has_trivial_assign)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/has_trivial_assign.hpp>
#endif
TT_TEST_BEGIN(has_trivial_assign)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_TRAITS(has_trivial_constructor)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/has_trivial_constructor.hpp>
#endif
TT_TEST_BEGIN(has_trivial_constructor)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_TRAITS(has_trivial_copy)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/has_trivial_copy.hpp>
#endif
TT_TEST_BEGIN(has_trivial_copy)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_TRAITS(has_trivial_destructor)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/has_trivial_destructor.hpp>
#endif
TT_TEST_BEGIN(has_trivial_destructor)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_TRAITS(is_arithmetic)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/is_arithmetic.hpp>
#endif
TT_TEST_BEGIN(is_arithmetic)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_TRAITS(is_array)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/is_array.hpp>
#endif
struct convertible_to_pointer
{

View File

@@ -7,7 +7,11 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_TRAITS(is_base_and_derived)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/is_base_and_derived.hpp>
#endif

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_TRAITS(is_class)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/is_class.hpp>
#endif
#include <iostream>
TT_TEST_BEGIN(is_class)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_TRAITS(is_compound)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/is_compound.hpp>
#endif
TT_TEST_BEGIN(is_compound)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_TRAITS(is_const)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/is_const.hpp>
#endif
TT_TEST_BEGIN(is_const)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_COMPARE(is_convertible)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/is_convertible.hpp>
#endif
template <class T>
struct convertible_from

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_TRAITS(is_empty)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/is_empty.hpp>
#endif
struct non_default_constructable_UDT
{

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_TRAITS(is_enum)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/is_enum.hpp>
#endif
TT_TEST_BEGIN(is_enum)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_TRAITS(is_float)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/is_float.hpp>
#endif
TT_TEST_BEGIN(is_float)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_TRAITS(is_function)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/is_function.hpp>
#endif
TT_TEST_BEGIN(is_function)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_TRAITS(is_fundamental)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/is_fundamental.hpp>
#endif
TT_TEST_BEGIN(is_fundamental)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_TRAITS(is_integral)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/is_integral.hpp>
#endif
TT_TEST_BEGIN(is_integral)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_TRAITS(is_member_function_pointer)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/is_member_function_pointer.hpp>
#endif
TT_TEST_BEGIN(is_member_function_pointer)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_TRAITS(is_member_pointer)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/is_member_pointer.hpp>
#endif
TT_TEST_BEGIN(is_member_pointer)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_TRAITS(is_object)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/is_object.hpp>
#endif
TT_TEST_BEGIN(is_object)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_TRAITS(is_pod)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/is_pod.hpp>
#endif
TT_TEST_BEGIN(is_pod)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_TRAITS(is_pointer)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/is_pointer.hpp>
#endif
TT_TEST_BEGIN(is_pointer)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_TRAITS(is_polymorphic)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/is_polymorphic.hpp>
#endif
#include <exception>
#include <stdexcept>

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_TRAITS(is_reference)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/is_reference.hpp>
#endif
TT_TEST_BEGIN(is_reference)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_COMPARE(is_same)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/is_same.hpp>
#endif
TT_TEST_BEGIN(is_same)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_TRAITS(is_scalar)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/is_scalar.hpp>
#endif
TT_TEST_BEGIN(is_scalar)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_TRAITS(is_stateless)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/is_stateless.hpp>
#endif
TT_TEST_BEGIN(is_stateless)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_TRAITS(is_union)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/is_union.hpp>
#endif
#include <iostream>
TT_TEST_BEGIN(is_union)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_TRAITS(is_void)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/is_void.hpp>
#endif
TT_TEST_BEGIN(is_void)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_TRAITS(is_volatile)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/is_volatile.hpp>
#endif
TT_TEST_BEGIN(is_volatile)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_type.hpp"
#include TYPE_TRANSFORM(remove_bounds)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/remove_bounds.hpp>
#endif
BOOST_DECL_TRANSFORM_TEST(remove_bounds_test_1, ::boost::remove_bounds, const, const)
BOOST_DECL_TRANSFORM_TEST(remove_bounds_test_2, ::boost::remove_bounds, volatile, volatile)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_type.hpp"
#include TYPE_TRANSFORM(remove_const)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/remove_const.hpp>
#endif
BOOST_DECL_TRANSFORM_TEST3(remove_const_test_1, ::boost::remove_const, const)
BOOST_DECL_TRANSFORM_TEST(remove_const_test_2, ::boost::remove_const, volatile, volatile)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_type.hpp"
#include TYPE_TRANSFORM(remove_cv)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/remove_cv.hpp>
#endif
BOOST_DECL_TRANSFORM_TEST3(remove_cv_test_1, ::boost::remove_cv, const)
BOOST_DECL_TRANSFORM_TEST3(remove_cv_test_2, ::boost::remove_cv, volatile)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_type.hpp"
#include TYPE_TRANSFORM(remove_pointer)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/remove_pointer.hpp>
#endif
BOOST_DECL_TRANSFORM_TEST(remove_pointer_test_1, ::boost::remove_pointer, const, const)
BOOST_DECL_TRANSFORM_TEST(remove_pointer_test_2, ::boost::remove_pointer, volatile, volatile)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_type.hpp"
#include TYPE_TRANSFORM(remove_reference)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/remove_reference.hpp>
#endif
BOOST_DECL_TRANSFORM_TEST(remove_reference_test_1, ::boost::remove_reference, const, const)
BOOST_DECL_TRANSFORM_TEST(remove_reference_test_2, ::boost::remove_reference, volatile, volatile)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_type.hpp"
#include TYPE_TRANSFORM(remove_volatile)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/remove_volatile.hpp>
#endif
BOOST_DECL_TRANSFORM_TEST(remove_volatile_test_1, ::boost::remove_volatile, const, const)
BOOST_DECL_TRANSFORM_TEST3(remove_volatile_test_2, ::boost::remove_volatile, volatile)

View File

@@ -16,17 +16,17 @@
#define tt std
#define TYPE_TRAITS(x) <type_traits>
#define TYPE_COMPARE(x) <type_compare>
#define TYPE_TRANSFORM(x) <type_transform>
//#define TYPE_TRAITS(x) <type_traits>
//#define TYPE_COMPARE(x) <type_compare>
//#define TYPE_TRANSFORM(x) <type_transform>
#else
#define tt boost
#define TYPE_TRAITS(x) BOOST_STRINGIZE(boost/type_traits/x.hpp)
#define TYPE_COMPARE(x) BOOST_STRINGIZE(boost/type_traits/x.hpp)
#define TYPE_TRANSFORM(x) BOOST_STRINGIZE(boost/type_traits/x.hpp)
//#define TYPE_TRAITS(x) BOOST_STRINGIZE(boost/type_traits/x.hpp)
//#define TYPE_COMPARE(x) BOOST_STRINGIZE(boost/type_traits/x.hpp)
//#define TYPE_TRANSFORM(x) BOOST_STRINGIZE(boost/type_traits/x.hpp)
#endif

View File

@@ -6,8 +6,12 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_TRAITS(is_empty)
#include TYPE_TRAITS(is_stateless)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/is_empty.hpp>
# include <boost/type_traits/is_stateless.hpp>
#endif
TT_TEST_BEGIN(tricky_abstract_type_test)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_type.hpp"
#include TYPE_TRANSFORM(add_pointer)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/add_pointer.hpp>
#endif
BOOST_DECL_TRANSFORM_TEST(add_pointer_test_5, ::boost::add_pointer, const &, const*)
BOOST_DECL_TRANSFORM_TEST(add_pointer_test_6, ::boost::add_pointer, &, *)

View File

@@ -6,18 +6,22 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_TRAITS(is_function)
#include TYPE_TRAITS(is_float)
#include TYPE_TRAITS(is_enum)
#include TYPE_TRAITS(is_class)
#include TYPE_TRAITS(is_scalar)
#include TYPE_TRAITS(is_pod)
#include TYPE_TRAITS(has_trivial_constructor)
#include TYPE_TRAITS(has_trivial_copy)
#include TYPE_TRAITS(has_trivial_assign)
#include TYPE_TRAITS(has_trivial_destructor)
#include TYPE_TRAITS(is_compound)
#include TYPE_TRAITS(is_base_and_derived)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/is_function.hpp>
# include <boost/type_traits/is_float.hpp>
# include <boost/type_traits/is_enum.hpp>
# include <boost/type_traits/is_class.hpp>
# include <boost/type_traits/is_scalar.hpp>
# include <boost/type_traits/is_pod.hpp>
# include <boost/type_traits/has_trivial_constructor.hpp>
# include <boost/type_traits/has_trivial_copy.hpp>
# include <boost/type_traits/has_trivial_assign.hpp>
# include <boost/type_traits/has_trivial_destructor.hpp>
# include <boost/type_traits/is_compound.hpp>
# include <boost/type_traits/is_base_and_derived.hpp>
#endif
TT_TEST_BEGIN(tricky_function_type_test)

View File

@@ -6,7 +6,11 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include <boost/type_traits.hpp>
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits.hpp>
#endif
TT_TEST_BEGIN(tricky_incomplete_type_test)

View File

@@ -5,7 +5,11 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_TRAITS(is_enum)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/is_enum.hpp>
#endif
struct convertible_to_anything
{

View File

@@ -6,14 +6,18 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_TRAITS(alignment_of)
#include TYPE_TRAITS(has_nothrow_assign)
#include TYPE_TRAITS(has_nothrow_constructor)
#include TYPE_TRAITS(has_nothrow_copy)
#include TYPE_TRAITS(is_base_and_derived)
#include TYPE_COMPARE(is_same)
#include TYPE_COMPARE(is_convertible)
#include TYPE_TRAITS(is_polymorphic)
#ifdef TEST_STD
# include <type_traits>
#else
#include <boost/type_traits/alignment_of.hpp>
#include <boost/type_traits/has_nothrow_assign.hpp>
#include <boost/type_traits/has_nothrow_constructor.hpp>
#include <boost/type_traits/has_nothrow_copy.hpp>
#include <boost/type_traits/is_base_and_derived.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/type_traits/is_convertible.hpp>
#include <boost/type_traits/is_polymorphic.hpp>
#endif
//
// VC++ emits an awful lot of warnings unless we define these:

View File

@@ -6,10 +6,13 @@
#include "test.hpp"
#include "check_integral_constant.hpp"
#include TYPE_TRAITS(alignment_of)
#include TYPE_TRAITS(type_with_alignment)
#include TYPE_TRAITS(is_pod)
#ifdef TEST_STD
# include <type_traits>
#else
# include <boost/type_traits/alignment_of.hpp>
# include <boost/type_traits/type_with_alignment.hpp>
# include <boost/type_traits/is_pod.hpp>
#endif
TT_TEST_BEGIN(type_with_alignment)