From 160db0eaa6bfec5e81bf68472f3f50af4600c74b Mon Sep 17 00:00:00 2001 From: John Maddock Date: Fri, 4 Jun 2010 15:51:51 +0000 Subject: [PATCH] Add missing files from last commit. [SVN r62427] --- test/boost_no_0x_hdr_typeindex.ipp | 25 ++++++++++++++++++++ test/no_0x_hdr_typeindex_fail.cpp | 37 ++++++++++++++++++++++++++++++ test/no_0x_hdr_typeindex_pass.cpp | 37 ++++++++++++++++++++++++++++++ 3 files changed, 99 insertions(+) create mode 100644 test/boost_no_0x_hdr_typeindex.ipp create mode 100644 test/no_0x_hdr_typeindex_fail.cpp create mode 100644 test/no_0x_hdr_typeindex_pass.cpp diff --git a/test/boost_no_0x_hdr_typeindex.ipp b/test/boost_no_0x_hdr_typeindex.ipp new file mode 100644 index 00000000..b0555e7b --- /dev/null +++ b/test/boost_no_0x_hdr_typeindex.ipp @@ -0,0 +1,25 @@ +// (C) Copyright Beman Dawes 2009 + +// Use, modification and distribution are subject to 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) + +// See http://www.boost.org/libs/config for more information. + +// MACRO: BOOST_NO_0X_HDR_TYPEINDEX +// TITLE: C++0x header unavailable +// DESCRIPTION: The standard library does not supply C++0x header + +#include + +namespace boost_no_0x_hdr_typeindex { + +int test() +{ + std::type_index t1 = typeid(int); + std::type_index t2 = typeid(double); + std::hash h; + return (t1 != t2) && (h(t1) != h(t2)) ? 0 : 1; +} + +} diff --git a/test/no_0x_hdr_typeindex_fail.cpp b/test/no_0x_hdr_typeindex_fail.cpp new file mode 100644 index 00000000..83e903d3 --- /dev/null +++ b/test/no_0x_hdr_typeindex_fail.cpp @@ -0,0 +1,37 @@ +// This file was automatically generated on Fri Jun 04 12:51:34 2010 +// by libs/config/tools/generate.cpp +// Copyright John Maddock 2002-4. +// Use, modification and distribution are subject to 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) + +// See http://www.boost.org/libs/config for the most recent version.// +// Revision $Id: generate.cpp 49281 2008-10-11 15:40:44Z johnmaddock $ +// + + +// Test file for macro BOOST_NO_0X_HDR_TYPEINDEX +// This file should not compile, if it does then +// BOOST_NO_0X_HDR_TYPEINDEX should not be defined. +// See file boost_no_0x_hdr_typeindex.ipp for details + +// Must not have BOOST_ASSERT_CONFIG set; it defeats +// the objective of this file: +#ifdef BOOST_ASSERT_CONFIG +# undef BOOST_ASSERT_CONFIG +#endif + +#include +#include "test.hpp" + +#ifdef BOOST_NO_0X_HDR_TYPEINDEX +#include "boost_no_0x_hdr_typeindex.ipp" +#else +#error "this file should not compile" +#endif + +int main( int, char *[] ) +{ + return boost_no_0x_hdr_typeindex::test(); +} + diff --git a/test/no_0x_hdr_typeindex_pass.cpp b/test/no_0x_hdr_typeindex_pass.cpp new file mode 100644 index 00000000..52d38440 --- /dev/null +++ b/test/no_0x_hdr_typeindex_pass.cpp @@ -0,0 +1,37 @@ +// This file was automatically generated on Fri Jun 04 12:51:34 2010 +// by libs/config/tools/generate.cpp +// Copyright John Maddock 2002-4. +// Use, modification and distribution are subject to 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) + +// See http://www.boost.org/libs/config for the most recent version.// +// Revision $Id: generate.cpp 49281 2008-10-11 15:40:44Z johnmaddock $ +// + + +// Test file for macro BOOST_NO_0X_HDR_TYPEINDEX +// This file should compile, if it does not then +// BOOST_NO_0X_HDR_TYPEINDEX should be defined. +// See file boost_no_0x_hdr_typeindex.ipp for details + +// Must not have BOOST_ASSERT_CONFIG set; it defeats +// the objective of this file: +#ifdef BOOST_ASSERT_CONFIG +# undef BOOST_ASSERT_CONFIG +#endif + +#include +#include "test.hpp" + +#ifndef BOOST_NO_0X_HDR_TYPEINDEX +#include "boost_no_0x_hdr_typeindex.ipp" +#else +namespace boost_no_0x_hdr_typeindex = empty_boost; +#endif + +int main( int, char *[] ) +{ + return boost_no_0x_hdr_typeindex::test(); +} +