diff --git a/doc/html/boost_config/acknowledgements.html b/doc/html/boost_config/acknowledgements.html index 9c596611..901f8a5e 100644 --- a/doc/html/boost_config/acknowledgements.html +++ b/doc/html/boost_config/acknowledgements.html @@ -3,7 +3,7 @@ Acknowledgements - + @@ -23,14 +23,14 @@

-Acknowledgements +Acknowledgements

Beman Dawes provided the original config.hpp and part of this document.

- Vesa Karvonen provided a description of the principles (see rationale) + Vesa Karvonen provided a description of the principles (see rationale) and put together an early version of the current configuration setup.

diff --git a/doc/html/boost_config/boost_macro_reference.html b/doc/html/boost_config/boost_macro_reference.html index 10467132..a76b9e0e 100644 --- a/doc/html/boost_config/boost_macro_reference.html +++ b/doc/html/boost_config/boost_macro_reference.html @@ -3,7 +3,7 @@ Boost Macro Reference - + @@ -24,7 +24,7 @@

-Boost Macro Reference +Boost Macro Reference

Macros @@ -46,7 +46,7 @@

@@ -742,6 +742,24 @@ + +

+ BOOST_NO_RTTI +

+ + +

+ Compiler +

+ + +

+ The compiler may (or may not) have the typeid operator, but RTTI + on the dynamic type of an object is not supported. +

+ + +

BOOST_NO_SFINAE @@ -1204,7 +1222,7 @@

@@ -2371,7 +2389,7 @@

@@ -2664,7 +2682,7 @@

@@ -2903,7 +2921,7 @@

@@ -2920,7 +2938,7 @@

@@ -2978,7 +2996,7 @@

diff --git a/doc/html/boost_config/guidelines_for_boost_authors.html b/doc/html/boost_config/guidelines_for_boost_authors.html index 2e16141f..b2297d96 100644 --- a/doc/html/boost_config/guidelines_for_boost_authors.html +++ b/doc/html/boost_config/guidelines_for_boost_authors.html @@ -3,7 +3,7 @@ Guidelines for Boost Authors - + @@ -24,7 +24,7 @@

@@ -105,7 +105,7 @@

@@ -184,7 +184,7 @@

@@ -283,7 +283,7 @@

diff --git a/doc/html/boost_config/rationale.html b/doc/html/boost_config/rationale.html index cdd610f0..499cac66 100644 --- a/doc/html/boost_config/rationale.html +++ b/doc/html/boost_config/rationale.html @@ -3,7 +3,7 @@ Rationale - + @@ -24,7 +24,7 @@

The problem
@@ -41,7 +41,7 @@

Consider a situation in which you are concurrently developing on multiple @@ -104,7 +104,7 @@

The approach taken by boost's configuration headers is to separate configuration diff --git a/doc/html/index.html b/doc/html/index.html index 75b113f5..f11a3c2e 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -3,7 +3,7 @@ Boost.Config - + @@ -28,7 +28,7 @@

-

+

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)

@@ -94,7 +94,7 @@
@@ -113,7 +113,7 @@

@@ -152,10 +152,10 @@ them usable by both Boost library and user code.

- Boost informational or helper + Boost informational or helper macros are designed for use by Boost users as well as for our own internal - use. Note however, that the feature test - and defect test macros were designed + use. Note however, that the feature test + and defect test macros were designed for internal use by Boost libraries, not user code, so they can change at any time (though no gratuitous changes are made to them). Boost library problems resulting from changes to the configuration macros are caught by the Boost @@ -170,7 +170,7 @@

@@ -320,7 +320,7 @@

@@ -684,7 +684,7 @@

@@ -709,13 +709,13 @@

Next the compiler, standard library, and platform configuration files are included. These are included via macros (BOOST_COMPILER_CONFIG - etc, see user settable macros), + etc, see user settable macros), and if the corresponding macro is undefined then a separate header that detects which compiler/standard library/platform is in use is included in order to set these. The config can be told to ignore these headers altogether if the corresponding BOOST_NO_XXX macro is set (for example BOOST_NO_COMPILER_CONFIG - to disable including any compiler configuration file - see + to disable including any compiler configuration file - see user settable macros).

@@ -728,7 +728,7 @@

If you are working on a unix-like platform then you can use the configure script to generate a "frozen" configuration based on your current - compiler setup - see using the configure + compiler setup - see using the configure script for more details.

- +

Last revised: June 20, 2008 at 00:19:08 GMT

Last revised: August 25, 2008 at 09:59:24 GMT


diff --git a/doc/macro_reference.qbk b/doc/macro_reference.qbk index 70e35d51..977eb681 100644 --- a/doc/macro_reference.qbk +++ b/doc/macro_reference.qbk @@ -192,6 +192,10 @@ Pointers to members don't work when used as template parameters. The compiler misreads 8.5.1, treating classes as non-aggregate if they contain private or protected member functions. ]] +[[`BOOST_NO_RTTI`][Compiler][ +The compiler may (or may not) have the typeid operator, but RTTI on the dynamic type +of an object is not supported. +]] [[`BOOST_NO_SFINAE`][Compiler][ The compiler does not support the "Substitution Failure Is Not An Error" meta-programming idiom. diff --git a/include/boost/config/compiler/borland.hpp b/include/boost/config/compiler/borland.hpp index a593db76..d16c06d0 100644 --- a/include/boost/config/compiler/borland.hpp +++ b/include/boost/config/compiler/borland.hpp @@ -19,11 +19,13 @@ // last known and checked version is 0x600 (Builder X preview) // or 0x593 (CodeGear C++ Builder 2007 December 2007 update): #if (__BORLANDC__ > 0x593) && (__BORLANDC__ != 0x600) -# if defined(BOOST_ASSERT_CONFIG) +//# if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" -# else -# pragma message( "Unknown compiler version - please run the configure tests and report the results") -# endif +//# else +//# pragma message( "Unknown compiler version - please run the configure tests and report the results") +//# endif +#elif (__BORLANDC__ == 0x600) +# error "CBuilderX preview compiler is no longer supported" #endif // @@ -108,21 +110,52 @@ // Borland C++ Builder 2007 December 2007 Update and below: #if (__BORLANDC__ <= 0x593) -# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS -# define BOOST_NO_USING_TEMPLATE -# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE -# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS // we shouldn't really need this - but too many things choke // without it, this needs more investigation: # define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS -# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL # define BOOST_NO_IS_ABSTRACT # define BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS -# define BOOST_NO_TWO_PHASE_NAME_LOOKUP // Temporary workaround #define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif +// Borland C++ Builder 2008 and below: +#if (__BORLANDC__ <= 0x601) +# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL +# define BOOST_ILLEGAL_CV_REFERENCES +# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS +# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +# define BOOST_NO_TWO_PHASE_NAME_LOOKUP +# define BOOST_NO_USING_TEMPLATE +# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE +#endif + +// +// Positive Feature detection +// +// Borland C++ Builder 2008 and below: +#if (__BORLANDC__ >= 0x599) +# pragma defineonoption BOOST_CODEGEAR_0X_SUPPORT -Ax +#endif + +#if defined( BOOST_CODEGEAR_0X_SUPPORT ) +# #if __BORLANDC__ >= 0x610 +# define BOOST_HAS_ALIGNOF +# define BOOST_HAS_CHAR16_T +# define BOOST_HAS_CHAR32_T +# define BOOST_HAS_DECLTYPE +//# define BOOST_HAS_DEFAULTED_FN +//# define BOOST_HAS_DELETED_FN +# define BOOST_HAS_EXPLICIT_CONVERSION_OPS +//# define BOOST_HAS_NULLPTR +//# define BOOST_HAS_RAW_STRING +# define BOOST_HAS_REF_QUALIFIER +# define BOOST_HAS_RVALUE_REFS +//# define BOOST_HAS_SCOPED_ENUM +# define BOOST_HAS_STATIC_ASSERT +//# define BOOST_HAS_VARIADIC_TMPL +# #endif //__BORLANDC__ >= 0x610 #endif #if __BORLANDC__ >= 0x590 @@ -207,3 +240,4 @@ #define BOOST_COMPILER "Borland C++ version " BOOST_STRINGIZE(__BORLANDC__) + diff --git a/include/boost/config/compiler/codegear.hpp b/include/boost/config/compiler/codegear.hpp new file mode 100644 index 00000000..655a9600 --- /dev/null +++ b/include/boost/config/compiler/codegear.hpp @@ -0,0 +1,134 @@ +// (C) Copyright John Maddock 2001 - 2003. +// (C) Copyright David Abrahams 2002 - 2003. +// (C) Copyright Aleksey Gurtovoy 2002. +// 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 for most recent version. + +// CodeGear C++ compiler setup: + +#if !defined( BOOST_WITH_CODEGEAR_WARNINGS ) +// these warnings occur frequently in optimized template code +# pragma warn -8004 // var assigned value, but never used +# pragma warn -8008 // condition always true/false +# pragma warn -8066 // dead code can never execute +# pragma warn -8104 // static members with ctors not threadsafe +# pragma warn -8105 // reference member in class without ctors +#endif +// +// versions check: +// last known and checked version is 0x610 +#if (__CODEGEARC__ > 0x610) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# else +# pragma message( "Unknown compiler version - please run the configure tests and report the results") +# endif +#endif + +// CodeGear C++ Builder 2009 +#if (__CODEGEARC__ <= 0x610) +# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL +# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS +# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS +# define BOOST_NO_PRIVATE_IN_AGGREGATE +# define BOOST_NO_TWO_PHASE_NAME_LOOKUP +# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE +# define BOOST_NO_USING_TEMPLATE + // we shouldn't really need this - but too many things choke + // without it, this needs more investigation: +# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS + +// Still need tests writing +// # define BOOST_NO_TYPENAME_WITH_CTOR // Cannot use typename keyword when making temporaries of a dependant type +// # define BOOST_NO_NESTED_FRIENDSHIP // TC1 gives nested classes access rights as any other member + +# ifdef NDEBUG + // fix broken so that Boost.test works: +# include +# undef strcmp +# endif + // fix broken errno declaration: +# include +# ifndef errno +# define errno errno +# endif + +#endif + + +# define BOOST_HAS_CHAR16_T +# define BOOST_HAS_CHAR32_T +# define BOOST_HAS_LONG_LONG + +//# define BOOST_HAS_ALIGNOF +# define BOOST_HAS_DECLTYPE +# define BOOST_HAS_EXPLICIT_CONVERSION_OPS +//# define BOOST_HAS_RVALUE_REFS +# define BOOST_HAS_SCOPED_ENUM +//# define BOOST_HAS_STATIC_ASSERT +# define BOOST_HAS_STD_TYPE_TRAITS + +# define BOOST_HAS_TR1_HASH +# define BOOST_HAS_TR1_TYPE_TRAITS +# define BOOST_HAS_TR1_UNORDERED_MAP +# define BOOST_HAS_TR1_UNORDERED_SET + +# define BOOST_HAS_MACRO_USE_FACET + + + // On non-Win32 platforms let the platform config figure this out: +# ifdef _WIN32 +# define BOOST_HAS_STDINT_H +# endif + +// +// __int64: +// +#if !defined(__STRICT_ANSI__) +# define BOOST_HAS_MS_INT64 +#endif +// +// check for exception handling support: +// +#if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS) +# define BOOST_NO_EXCEPTIONS +#endif +// +// all versions have a : +// +#if !defined(__STRICT_ANSI__) +# define BOOST_HAS_DIRENT_H +#endif +// +// all versions support __declspec: +// +#if !defined(__STRICT_ANSI__) +# define BOOST_HAS_DECLSPEC +#endif +// +// ABI fixing headers: +// +#ifndef BOOST_ABI_PREFIX +# define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp" +#endif +#ifndef BOOST_ABI_SUFFIX +# define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp" +#endif +// +// Disable Win32 support in ANSI mode: +// +# pragma defineonoption BOOST_DISABLE_WIN32 -A +// +// MSVC compatibility mode does some nasty things: +// TODO: look up if this doesn't apply to the whole 12xx range +// +#if defined(_MSC_VER) && (_MSC_VER <= 1200) +# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP +# define BOOST_NO_VOID_RETURNS +#endif + +#define BOOST_COMPILER "CodeGear C++ version " BOOST_STRINGIZE(__CODEGEARC__) + diff --git a/include/boost/config/compiler/gcc.hpp b/include/boost/config/compiler/gcc.hpp index 17895dcb..27df829b 100644 --- a/include/boost/config/compiler/gcc.hpp +++ b/include/boost/config/compiler/gcc.hpp @@ -91,6 +91,15 @@ #if __GNUC__ > 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 1 ) #define BOOST_HAS_NRVO #endif +// +// RTTI and typeinfo detection is possible post gcc-4.3: +// +#if __GNUC__ * 100 + __GNUC_MINOR__ >= 403 +# ifndef __GXX_RTTI +# define BOOST_NO_TYPEID +# define BOOST_NO_RTTI +# endif +#endif // // C++0x features diff --git a/include/boost/config/compiler/pgi.hpp b/include/boost/config/compiler/pgi.hpp index 0f88d38e..41f29c75 100644 --- a/include/boost/config/compiler/pgi.hpp +++ b/include/boost/config/compiler/pgi.hpp @@ -16,7 +16,7 @@ // if no threading API is detected. // -#if (__PGIC__ == 7) && (__PGIC_MINOR__ == 1) +#if (__PGIC__ >= 7) #define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL #define BOOST_NO_TWO_PHASE_NAME_LOOKUP diff --git a/include/boost/config/compiler/visualc.hpp b/include/boost/config/compiler/visualc.hpp index 79173580..187591be 100644 --- a/include/boost/config/compiler/visualc.hpp +++ b/include/boost/config/compiler/visualc.hpp @@ -123,6 +123,9 @@ #ifndef _MSC_EXTENSIONS # define BOOST_DISABLE_WIN32 #endif +#ifndef _CPPRTTI +# define BOOST_NO_RTTI +#endif // // all versions support __declspec: diff --git a/include/boost/config/no_tr1/cmath.hpp b/include/boost/config/no_tr1/cmath.hpp new file mode 100644 index 00000000..d8268d84 --- /dev/null +++ b/include/boost/config/no_tr1/cmath.hpp @@ -0,0 +1,28 @@ +// (C) Copyright John Maddock 2008. +// 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) +// +// The aim of this header is just to include but to do +// so in a way that does not result in recursive inclusion of +// the Boost TR1 components if boost/tr1/tr1/cmath is in the +// include search path. We have to do this to avoid circular +// dependencies: +// + +#ifndef BOOST_CONFIG_CMATH +# define BOOST_CONFIG_CMATH + +# ifndef BOOST_TR1_NO_RECURSION +# define BOOST_TR1_NO_RECURSION +# define BOOST_CONFIG_NO_CMATH_RECURSION +# endif + +# include + +# ifdef BOOST_CONFIG_NO_CMATH_RECURSION +# undef BOOST_TR1_NO_RECURSION +# undef BOOST_CONFIG_NO_CMATH_RECURSION +# endif + +#endif diff --git a/include/boost/config/platform/bsd.hpp b/include/boost/config/platform/bsd.hpp index df230850..810d3707 100644 --- a/include/boost/config/platform/bsd.hpp +++ b/include/boost/config/platform/bsd.hpp @@ -43,7 +43,19 @@ // // No wide character support in the BSD header files: // -#if !(defined(__FreeBSD__) && (__FreeBSD__ >= 5)) +#if defined(__NetBSD__) +#define __NetBSD_GCC__ (__GNUC__ * 1000000 \ + + __GNUC_MINOR__ * 1000 \ + + __GNUC_PATCHLEVEL__) +// XXX - the following is required until c++config.h +// defines _GLIBCXX_HAVE_SWPRINTF and friends +// or the preprocessor conditionals are removed +// from the cwchar header. +#define _GLIBCXX_HAVE_SWPRINTF 1 +#endif + +#if !((defined(__FreeBSD__) && (__FreeBSD__ >= 5)) \ + || (__NetBSD_GCC__ >= 2095003)) # define BOOST_NO_CWCHAR #endif // diff --git a/include/boost/config/select_compiler_config.hpp b/include/boost/config/select_compiler_config.hpp index 8d8db903..9141cd63 100644 --- a/include/boost/config/select_compiler_config.hpp +++ b/include/boost/config/select_compiler_config.hpp @@ -72,6 +72,10 @@ // Greenhills C++ # define BOOST_COMPILER_CONFIG "boost/config/compiler/greenhills.hpp" +#elif defined __CODEGEARC__ +// CodeGear - must be checked for before Borland +# define BOOST_COMPILER_CONFIG "boost/config/compiler/codegear.hpp" + #elif defined __BORLANDC__ // Borland # define BOOST_COMPILER_CONFIG "boost/config/compiler/borland.hpp" diff --git a/include/boost/config/suffix.hpp b/include/boost/config/suffix.hpp index 41688906..dd7c998e 100644 --- a/include/boost/config/suffix.hpp +++ b/include/boost/config/suffix.hpp @@ -157,6 +157,13 @@ # define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL #endif +// +// Without typeid support we have no dynamic RTTI either: +// +#if defined(BOOST_NO_TYPEID) && !defined(BOOST_NO_RTTI) +# define BOOST_NO_RTTI +#endif + // // If we have a standard allocator, then we have a partial one as well: // @@ -267,11 +274,11 @@ // Define BOOST_NO_SLIST and BOOST_NO_HASH if required. // Note that this is for backwards compatibility only. // -# ifndef BOOST_HAS_SLIST +# if !defined(BOOST_HAS_SLIST) && !defined(BOOST_NO_SLIST) # define BOOST_NO_SLIST # endif -# ifndef BOOST_HAS_HASH +# if !defined(BOOST_HAS_HASH) && !defined(BOOST_NO_HASH) # define BOOST_NO_HASH # endif diff --git a/test/all/Jamfile.v2 b/test/all/Jamfile.v2 index 2aea1e01..d04849d0 100644 --- a/test/all/Jamfile.v2 +++ b/test/all/Jamfile.v2 @@ -1,7 +1,7 @@ # # Regression test Jamfile for boost configuration setup. # *** DO NOT EDIT THIS FILE BY HAND *** -# This file was automatically generated on Sat Jul 12 12:39:35 2008 +# This file was automatically generated on Mon Aug 25 10:51:52 2008 # by libs/config/tools/generate.cpp # Copyright John Maddock. # Use, modification and distribution are subject to the @@ -292,6 +292,9 @@ test-suite "BOOST_NO_POINTER_TO_MEMBER_CONST" : test-suite "BOOST_NO_UNREACHABLE_RETURN_DETECTION" : [ run ../no_ret_det_pass.cpp ] [ compile-fail ../no_ret_det_fail.cpp ] ; +test-suite "BOOST_NO_RTTI" : +[ run ../no_rtti_pass.cpp ] +[ compile-fail ../no_rtti_fail.cpp ] ; test-suite "BOOST_NO_SFINAE" : [ run ../no_sfinae_pass.cpp ] [ compile-fail ../no_sfinae_fail.cpp ] ; diff --git a/test/boost_no_rtti.ipp b/test/boost_no_rtti.ipp new file mode 100644 index 00000000..69594722 --- /dev/null +++ b/test/boost_no_rtti.ipp @@ -0,0 +1,57 @@ +// (C) Copyright John Maddock 2008. +// 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 most recent version. + +// MACRO: BOOST_NO_RTTI +// TITLE: RTTI unavailable +// DESCRIPTION: The compiler does not support RTTI in this mode + +#include + +class A +{ +public: + A(){} + virtual void t(); +}; + +void A::t() +{ +} + +class B : public A +{ +public: + B(){} + virtual void t(); +}; + +void B::t() +{ +} + +namespace boost_no_rtti +{ + +int check(const A& a) +{ + return typeid(a) == typeid(B) ? 0 : 1; +} + +int test() +{ + try{ + B b; + return check(b); + } + catch(...) + { + return 1; + } +} + +} + diff --git a/test/config_info.cpp b/test/config_info.cpp index e16642f9..91e5fdcf 100644 --- a/test/config_info.cpp +++ b/test/config_info.cpp @@ -987,6 +987,7 @@ void print_boost_macros() PRINT_MACRO(BOOST_NO_POINTER_TO_MEMBER_CONST); PRINT_MACRO(BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS); PRINT_MACRO(BOOST_NO_PRIVATE_IN_AGGREGATE); + PRINT_MACRO(BOOST_NO_RTTI); PRINT_MACRO(BOOST_NO_SFINAE); PRINT_MACRO(BOOST_NO_STDC_NAMESPACE); PRINT_MACRO(BOOST_NO_STD_ALLOCATOR); @@ -1033,6 +1034,7 @@ void print_boost_macros() + // END GENERATED BLOCK diff --git a/test/config_test.cpp b/test/config_test.cpp index 606a1a64..ef6faef0 100644 --- a/test/config_test.cpp +++ b/test/config_test.cpp @@ -1,4 +1,4 @@ -// This file was automatically generated on Sat Jul 12 12:39:34 2008 +// This file was automatically generated on Mon Aug 25 10:51:52 2008 // by libs/config/tools/generate.cpp // Copyright John Maddock 2002-4. // Use, modification and distribution are subject to the @@ -217,6 +217,11 @@ namespace boost_no_pointer_to_member_const = empty_boost; #else namespace boost_no_unreachable_return_detection = empty_boost; #endif +#ifndef BOOST_NO_RTTI +#include "boost_no_rtti.ipp" +#else +namespace boost_no_rtti = empty_boost; +#endif #ifndef BOOST_NO_SFINAE #include "boost_no_sfinae.ipp" #else @@ -1051,6 +1056,11 @@ int main( int, char *[] ) std::cerr << "Failed test for BOOST_NO_UNREACHABLE_RETURN_DETECTION at: " << __FILE__ << ":" << __LINE__ << std::endl; ++error_count; } + if(0 != boost_no_rtti::test()) + { + std::cerr << "Failed test for BOOST_NO_RTTI at: " << __FILE__ << ":" << __LINE__ << std::endl; + ++error_count; + } if(0 != boost_no_sfinae::test()) { std::cerr << "Failed test for BOOST_NO_SFINAE at: " << __FILE__ << ":" << __LINE__ << std::endl; diff --git a/test/link/test/Jamfile.v2 b/test/link/test/Jamfile.v2 index 3de72240..234da7cc 100644 --- a/test/link/test/Jamfile.v2 +++ b/test/link/test/Jamfile.v2 @@ -72,40 +72,41 @@ autolink-lib link_test : ../link_test.cpp explicit link_test ; run ../main.cpp link_test - : : : msvc-8.0:no static static single debug : link_test_static_single_debug ; + : : : msvc-8.0:no static static single debug : link_test_ssd ; run ../main.cpp link_test - : : : msvc-8.0:no static static single release : link_test_static_single_release ; + : : : msvc-8.0:no static static single release : link_test_ssr ; run ../main.cpp link_test - : : : static static multi debug : link_test_static_multi_debug ; + : : : static static multi debug : link_test_smd ; run ../main.cpp link_test - : : : static static multi release : link_test_static_multi_release ; + : : : static static multi release : link_test_smr ; run ../main.cpp link_test - : : : static shared multi debug : link_test_dyn_multi_debug ; + : : : static shared multi debug : link_test_dmd ; run ../main.cpp link_test - : : : static shared multi release : link_test_dyn_multi_release ; + : : : static shared multi release : link_test_dmr ; run ../main.cpp link_test - : : : static shared single debug : link_test_dyn_single_debug ; + : : : static shared single debug : link_test_dsd ; run ../main.cpp link_test - : : : static shared single release : link_test_dyn_single_release ; + : : : static shared single release : link_test_dsr ; run ../main.cpp link_test - : : : BOOST_DYN_LINK=1 shared shared multi debug : link_test_dll_dyn_multi_debug ; + : : : BOOST_DYN_LINK=1 shared shared multi debug : link_test_dll_dmd ; run ../main.cpp link_test - : : : BOOST_DYN_LINK=1 shared shared multi release : link_test_dll_dyn_multi_release ; + : : : BOOST_DYN_LINK=1 shared shared multi release : link_test_dll_dmr ; run ../main.cpp link_test - : : : BOOST_DYN_LINK=1 shared shared single debug : link_test_dll_dyn_single_debug ; + : : : BOOST_DYN_LINK=1 shared shared single debug : link_test_dll_dsd ; run ../main.cpp link_test - : : : BOOST_DYN_LINK=1 shared shared single release : link_test_dll_dyn_single_release ; + : : : BOOST_DYN_LINK=1 shared shared single release : link_test_dll_dsr ; + diff --git a/test/no_rtti_fail.cpp b/test/no_rtti_fail.cpp new file mode 100644 index 00000000..f24f15d6 --- /dev/null +++ b/test/no_rtti_fail.cpp @@ -0,0 +1,37 @@ +// This file was automatically generated on Mon Aug 25 10:51:51 2008 +// 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 47351 2008-07-12 12:41:52Z johnmaddock $ +// + + +// Test file for macro BOOST_NO_RTTI +// This file should not compile, if it does then +// BOOST_NO_RTTI should not be defined. +// See file boost_no_rtti.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_RTTI +#include "boost_no_rtti.ipp" +#else +#error "this file should not compile" +#endif + +int main( int, char *[] ) +{ + return boost_no_rtti::test(); +} + diff --git a/test/no_rtti_pass.cpp b/test/no_rtti_pass.cpp new file mode 100644 index 00000000..9809213f --- /dev/null +++ b/test/no_rtti_pass.cpp @@ -0,0 +1,37 @@ +// This file was automatically generated on Mon Aug 25 10:51:51 2008 +// 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 47351 2008-07-12 12:41:52Z johnmaddock $ +// + + +// Test file for macro BOOST_NO_RTTI +// This file should compile, if it does not then +// BOOST_NO_RTTI should be defined. +// See file boost_no_rtti.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_RTTI +#include "boost_no_rtti.ipp" +#else +namespace boost_no_rtti = empty_boost; +#endif + +int main( int, char *[] ) +{ + return boost_no_rtti::test(); +} +