Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51880 - in trunk: boost/config/compiler libs/config/test libs/config/test/all
From: andrey.semashev_at_[hidden]
Date: 2009-03-21 08:39:49


Author: andysem
Date: 2009-03-21 08:39:47 EDT (Sat, 21 Mar 2009)
New Revision: 51880
URL: http://svn.boost.org/trac/boost/changeset/51880

Log:
Added configuration macros BOOST_NO_AUTO_DECLARATIONS and BOOST_NO_AUTO_MULTIDECLARATIONS (take two). The C++0x features were disabled for MSVC 2010 as it is too far from release now. The macros are also defined for Borland and Codegear as these features are not announced in the release notes.
Added:
   trunk/libs/config/test/boost_no_auto_declarations.ipp (contents, props changed)
   trunk/libs/config/test/boost_no_auto_multidecl.ipp (contents, props changed)
   trunk/libs/config/test/no_auto_declarations_fail.cpp (contents, props changed)
   trunk/libs/config/test/no_auto_declarations_pass.cpp (contents, props changed)
   trunk/libs/config/test/no_auto_multidecl_fail.cpp (contents, props changed)
   trunk/libs/config/test/no_auto_multidecl_pass.cpp (contents, props changed)
Text files modified:
   trunk/boost/config/compiler/borland.hpp | 4 +-
   trunk/boost/config/compiler/codegear.hpp | 70 ++++++++++++++++++++-------------------
   trunk/boost/config/compiler/visualc.hpp | 14 ++++----
   trunk/libs/config/test/all/Jamfile.v2 | 8 ++++
   trunk/libs/config/test/config_info.cpp | 3 +
   trunk/libs/config/test/config_test.cpp | 22 ++++++++++++
   6 files changed, 76 insertions(+), 45 deletions(-)

Modified: trunk/boost/config/compiler/borland.hpp
==============================================================================
--- trunk/boost/config/compiler/borland.hpp (original)
+++ trunk/boost/config/compiler/borland.hpp 2009-03-21 08:39:47 EDT (Sat, 21 Mar 2009)
@@ -176,10 +176,10 @@
 # define BOOST_NO_DELETED_FUNCTIONS
 # define BOOST_NO_RAW_LITERALS
 # define BOOST_NO_UNICODE_LITERALS
-# define BOOST_NO_AUTO_DECLARATIONS
-# define BOOST_NO_AUTO_MULTIDECLARATIONS
 #endif
 
+#define BOOST_NO_AUTO_DECLARATIONS
+#define BOOST_NO_AUTO_MULTIDECLARATIONS
 #define BOOST_NO_INITIALIZER_LISTS
 
 #if __BORLANDC__ >= 0x590

Modified: trunk/boost/config/compiler/codegear.hpp
==============================================================================
--- trunk/boost/config/compiler/codegear.hpp (original)
+++ trunk/boost/config/compiler/codegear.hpp 2009-03-21 08:39:47 EDT (Sat, 21 Mar 2009)
@@ -62,44 +62,46 @@
 //
 // C++0x macros:
 //
-# 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_NO_EXTERN_TEMPLATE
-# define BOOST_NO_SCOPED_ENUMS
-# define BOOST_NO_STATIC_ASSERT
-# define BOOST_NO_RVALUE_REFERENCES
-# define BOOST_NO_VARIADIC_TEMPLATES
-# define BOOST_NO_CONSTEXPR
-# define BOOST_NO_DEFAULTED_FUNCTIONS
-# define BOOST_NO_DELETED_FUNCTIONS
-# define BOOST_NO_RAW_LITERALS
-# define BOOST_NO_UNICODE_LITERALS
+#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_NO_EXTERN_TEMPLATE
+#define BOOST_NO_SCOPED_ENUMS
+#define BOOST_NO_STATIC_ASSERT
+#define BOOST_NO_RVALUE_REFERENCES
+#define BOOST_NO_VARIADIC_TEMPLATES
+#define BOOST_NO_CONSTEXPR
+#define BOOST_NO_DEFAULTED_FUNCTIONS
+#define BOOST_NO_DELETED_FUNCTIONS
+#define BOOST_NO_RAW_LITERALS
+#define BOOST_NO_UNICODE_LITERALS
+#define BOOST_NO_AUTO_DECLARATIONS
+#define BOOST_NO_AUTO_MULTIDECLARATIONS
 
 //
 // TR1 macros:
 //
-# 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
-
-# define BOOST_NO_INITIALIZER_LISTS
-
- // On non-Win32 platforms let the platform config figure this out:
-# ifdef _WIN32
-# define BOOST_HAS_STDINT_H
-# endif
+#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
+
+#define BOOST_NO_INITIALIZER_LISTS
+
+// On non-Win32 platforms let the platform config figure this out:
+#ifdef _WIN32
+# define BOOST_HAS_STDINT_H
+#endif
 
 //
 // __int64:

Modified: trunk/boost/config/compiler/visualc.hpp
==============================================================================
--- trunk/boost/config/compiler/visualc.hpp (original)
+++ trunk/boost/config/compiler/visualc.hpp 2009-03-21 08:39:47 EDT (Sat, 21 Mar 2009)
@@ -159,13 +159,13 @@
 #define BOOST_NO_UNICODE_LITERALS
 #define BOOST_NO_VARIADIC_TEMPLATES
 
-// MSVC 2010 has some support for C++0x
-#if _MSC_VER < 1600
-# define BOOST_NO_RVALUE_REFERENCES
-# define BOOST_NO_STATIC_ASSERT
-# define BOOST_NO_AUTO_DECLARATIONS
-# define BOOST_NO_AUTO_MULTIDECLARATIONS
-#endif // _MSC_VER < 1600
+// MSVC 2010 CTP has some support for C++0x, but we still disable it until the compiler release
+// #if _MSC_VER < 1600
+#define BOOST_NO_RVALUE_REFERENCES
+#define BOOST_NO_STATIC_ASSERT
+#define BOOST_NO_AUTO_DECLARATIONS
+#define BOOST_NO_AUTO_MULTIDECLARATIONS
+// #endif // _MSC_VER < 1600
 
 //
 // prefix and suffix headers:

Modified: trunk/libs/config/test/all/Jamfile.v2
==============================================================================
--- trunk/libs/config/test/all/Jamfile.v2 (original)
+++ trunk/libs/config/test/all/Jamfile.v2 2009-03-21 08:39:47 EDT (Sat, 21 Mar 2009)
@@ -1,7 +1,7 @@
 #
 # Regression test Jamfile for boost configuration setup.
 # *** DO NOT EDIT THIS FILE BY HAND ***
-# This file was automatically generated on Fri Feb 20 21:15:18 2009
+# This file was automatically generated on Sat Mar 21 15:13:32 2009
 # by libs/config/tools/generate.cpp
 # Copyright John Maddock.
 # Use, modification and distribution are subject to the
@@ -184,6 +184,12 @@
 test-suite "BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS" :
 [ run ../no_array_type_spec_pass.cpp ]
 [ compile-fail ../no_array_type_spec_fail.cpp ] ;
+test-suite "BOOST_NO_AUTO_DECLARATIONS" :
+[ run ../no_auto_declarations_pass.cpp ]
+[ compile-fail ../no_auto_declarations_fail.cpp ] ;
+test-suite "BOOST_NO_AUTO_MULTIDECLARATIONS" :
+[ run ../no_auto_multidecl_pass.cpp ]
+[ compile-fail ../no_auto_multidecl_fail.cpp ] ;
 test-suite "BOOST_NO_AUTO_PTR" :
 [ run ../no_auto_ptr_pass.cpp ]
 [ compile-fail ../no_auto_ptr_fail.cpp ] ;

Added: trunk/libs/config/test/boost_no_auto_declarations.ipp
==============================================================================
--- (empty file)
+++ trunk/libs/config/test/boost_no_auto_declarations.ipp 2009-03-21 08:39:47 EDT (Sat, 21 Mar 2009)
@@ -0,0 +1,25 @@
+// Copyright (C) 2009 Andrey Semashev
+// 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_AUTO_DECLARATIONS
+// TITLE: C++0x auto declarators unavailable
+// DESCRIPTION: The compiler does not support C++0x declarations of variables with automatically deduced type
+
+namespace boost_no_auto_declarations {
+
+void check(int& x)
+{
+}
+
+int test()
+{
+ auto x = 10;
+ check(x);
+ return 0;
+}
+
+}

Added: trunk/libs/config/test/boost_no_auto_multidecl.ipp
==============================================================================
--- (empty file)
+++ trunk/libs/config/test/boost_no_auto_multidecl.ipp 2009-03-21 08:39:47 EDT (Sat, 21 Mar 2009)
@@ -0,0 +1,25 @@
+// Copyright (C) 2009 Andrey Semashev
+// 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_AUTO_MULTIDECLARATIONS
+// TITLE: C++0x auto multideclarators unavailable
+// DESCRIPTION: The compiler does not support C++0x declarations of series of variables with automatically deduced type
+
+namespace boost_no_auto_multideclarations {
+
+void check(int& x, int*& y)
+{
+}
+
+int test()
+{
+ auto x = 10, *y = &x;
+ check(x, y);
+ return 0;
+}
+
+}

Modified: trunk/libs/config/test/config_info.cpp
==============================================================================
--- trunk/libs/config/test/config_info.cpp (original)
+++ trunk/libs/config/test/config_info.cpp 2009-03-21 08:39:47 EDT (Sat, 21 Mar 2009)
@@ -955,6 +955,8 @@
    PRINT_MACRO(BOOST_NO_ADL_BARRIER);
    PRINT_MACRO(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP);
    PRINT_MACRO(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS);
+ PRINT_MACRO(BOOST_NO_AUTO_DECLARATIONS);
+ PRINT_MACRO(BOOST_NO_AUTO_MULTIDECLARATIONS);
    PRINT_MACRO(BOOST_NO_AUTO_PTR);
    PRINT_MACRO(BOOST_NO_CHAR16_T);
    PRINT_MACRO(BOOST_NO_CHAR32_T);
@@ -1034,6 +1036,7 @@
    PRINT_MACRO(BOOST_NO_VARIADIC_TEMPLATES);
    PRINT_MACRO(BOOST_NO_VOID_RETURNS);
 
+
    // END GENERATED BLOCK
 
    PRINT_MACRO(BOOST_INTEL);

Modified: trunk/libs/config/test/config_test.cpp
==============================================================================
--- trunk/libs/config/test/config_test.cpp (original)
+++ trunk/libs/config/test/config_test.cpp 2009-03-21 08:39:47 EDT (Sat, 21 Mar 2009)
@@ -1,4 +1,4 @@
-// This file was automatically generated on Fri Feb 20 21:15:18 2009
+// This file was automatically generated on Sat Mar 21 15:13:32 2009
 // by libs/config/tools/generate.cpp
 // Copyright John Maddock 2002-4.
 // Use, modification and distribution are subject to the
@@ -37,6 +37,16 @@
 #else
 namespace boost_no_array_type_specializations = empty_boost;
 #endif
+#ifndef BOOST_NO_AUTO_DECLARATIONS
+#include "boost_no_auto_declarations.ipp"
+#else
+namespace boost_no_auto_declarations = empty_boost;
+#endif
+#ifndef BOOST_NO_AUTO_MULTIDECLARATIONS
+#include "boost_no_auto_multidecl.ipp"
+#else
+namespace boost_no_auto_multideclarations = empty_boost;
+#endif
 #ifndef BOOST_NO_AUTO_PTR
 #include "boost_no_auto_ptr.ipp"
 #else
@@ -971,6 +981,16 @@
       std::cerr << "Failed test for BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS at: " << __FILE__ << ":" << __LINE__ << std::endl;
       ++error_count;
    }
+ if(0 != boost_no_auto_declarations::test())
+ {
+ std::cerr << "Failed test for BOOST_NO_AUTO_DECLARATIONS at: " << __FILE__ << ":" << __LINE__ << std::endl;
+ ++error_count;
+ }
+ if(0 != boost_no_auto_multideclarations::test())
+ {
+ std::cerr << "Failed test for BOOST_NO_AUTO_MULTIDECLARATIONS at: " << __FILE__ << ":" << __LINE__ << std::endl;
+ ++error_count;
+ }
    if(0 != boost_no_auto_ptr::test())
    {
       std::cerr << "Failed test for BOOST_NO_AUTO_PTR at: " << __FILE__ << ":" << __LINE__ << std::endl;

Added: trunk/libs/config/test/no_auto_declarations_fail.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/config/test/no_auto_declarations_fail.cpp 2009-03-21 08:39:47 EDT (Sat, 21 Mar 2009)
@@ -0,0 +1,37 @@
+// This file was automatically generated on Thu Mar 12 17:32:04 2009
+// 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$
+//
+
+
+// Test file for macro BOOST_NO_AUTO_DECLARATIONS
+// This file should not compile, if it does then
+// BOOST_NO_AUTO_DECLARATIONS should not be defined.
+// See file boost_no_auto_declarations.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 <boost/config.hpp>
+#include "test.hpp"
+
+#ifdef BOOST_NO_AUTO_DECLARATIONS
+#include "boost_no_auto_declarations.ipp"
+#else
+#error "this file should not compile"
+#endif
+
+int main( int, char *[] )
+{
+ return boost_no_auto_declarations::test();
+}
+

Added: trunk/libs/config/test/no_auto_declarations_pass.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/config/test/no_auto_declarations_pass.cpp 2009-03-21 08:39:47 EDT (Sat, 21 Mar 2009)
@@ -0,0 +1,37 @@
+// This file was automatically generated on Thu Mar 12 17:32:04 2009
+// 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$
+//
+
+
+// Test file for macro BOOST_NO_AUTO_DECLARATIONS
+// This file should compile, if it does not then
+// BOOST_NO_AUTO_DECLARATIONS should be defined.
+// See file boost_no_auto_declarations.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 <boost/config.hpp>
+#include "test.hpp"
+
+#ifndef BOOST_NO_AUTO_DECLARATIONS
+#include "boost_no_auto_declarations.ipp"
+#else
+namespace boost_no_auto_declarations = empty_boost;
+#endif
+
+int main( int, char *[] )
+{
+ return boost_no_auto_declarations::test();
+}
+

Added: trunk/libs/config/test/no_auto_multidecl_fail.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/config/test/no_auto_multidecl_fail.cpp 2009-03-21 08:39:47 EDT (Sat, 21 Mar 2009)
@@ -0,0 +1,37 @@
+// This file was automatically generated on Thu Mar 12 17:32:04 2009
+// 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$
+//
+
+
+// Test file for macro BOOST_NO_AUTO_MULTIDECLARATIONS
+// This file should not compile, if it does then
+// BOOST_NO_AUTO_MULTIDECLARATIONS should not be defined.
+// See file boost_no_auto_multidecl.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 <boost/config.hpp>
+#include "test.hpp"
+
+#ifdef BOOST_NO_AUTO_MULTIDECLARATIONS
+#include "boost_no_auto_multidecl.ipp"
+#else
+#error "this file should not compile"
+#endif
+
+int main( int, char *[] )
+{
+ return boost_no_auto_multideclarations::test();
+}
+

Added: trunk/libs/config/test/no_auto_multidecl_pass.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/config/test/no_auto_multidecl_pass.cpp 2009-03-21 08:39:47 EDT (Sat, 21 Mar 2009)
@@ -0,0 +1,37 @@
+// This file was automatically generated on Thu Mar 12 17:32:04 2009
+// 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$
+//
+
+
+// Test file for macro BOOST_NO_AUTO_MULTIDECLARATIONS
+// This file should compile, if it does not then
+// BOOST_NO_AUTO_MULTIDECLARATIONS should be defined.
+// See file boost_no_auto_multidecl.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 <boost/config.hpp>
+#include "test.hpp"
+
+#ifndef BOOST_NO_AUTO_MULTIDECLARATIONS
+#include "boost_no_auto_multidecl.ipp"
+#else
+namespace boost_no_auto_multideclarations = empty_boost;
+#endif
+
+int main( int, char *[] )
+{
+ return boost_no_auto_multideclarations::test();
+}
+


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk