Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r61453 - in trunk: boost/config boost/config/compiler libs/config/test
From: john_at_[hidden]
Date: 2010-04-21 04:49:22


Author: johnmaddock
Date: 2010-04-21 04:49:21 EDT (Wed, 21 Apr 2010)
New Revision: 61453
URL: http://svn.boost.org/trac/boost/changeset/61453

Log:
Update some of the C++0x tests so they don't catch "fake" implementations.
Update config for VC10 accordingly.
Normalise use of BOOST_HAS_RVALUE_REFS - fixes #4112.
Text files modified:
   trunk/boost/config/compiler/visualc.hpp | 6 +++---
   trunk/boost/config/suffix.hpp | 7 +++++++
   trunk/libs/config/test/boost_no_char16_t.ipp | 3 ++-
   trunk/libs/config/test/boost_no_char32_t.ipp | 2 +-
   trunk/libs/config/test/boost_no_initializer_lists.ipp | 7 +++++++
   5 files changed, 20 insertions(+), 5 deletions(-)

Modified: trunk/boost/config/compiler/visualc.hpp
==============================================================================
--- trunk/boost/config/compiler/visualc.hpp (original)
+++ trunk/boost/config/compiler/visualc.hpp 2010-04-21 04:49:21 EDT (Wed, 21 Apr 2010)
@@ -162,13 +162,12 @@
 #define BOOST_NO_LAMBDAS
 #define BOOST_NO_RVALUE_REFERENCES
 #define BOOST_NO_STATIC_ASSERT
-#define BOOST_NO_CHAR16_T
-#define BOOST_NO_CHAR32_T
-#define BOOST_NO_INITIALIZER_LISTS
 #define BOOST_NO_NULLPTR
 #endif // _MSC_VER < 1600
 
 // C++0x features not supported by any versions
+#define BOOST_NO_CHAR16_T
+#define BOOST_NO_CHAR32_T
 #define BOOST_NO_CONCEPTS
 #define BOOST_NO_CONSTEXPR
 #define BOOST_NO_DEFAULTED_FUNCTIONS
@@ -177,6 +176,7 @@
 #define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
 #define BOOST_NO_EXTERN_TEMPLATE
 #define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#define BOOST_NO_INITIALIZER_LISTS
 #define BOOST_NO_RAW_LITERALS
 #define BOOST_NO_SCOPED_ENUMS
 #define BOOST_NO_SFINAE_EXPR

Modified: trunk/boost/config/suffix.hpp
==============================================================================
--- trunk/boost/config/suffix.hpp (original)
+++ trunk/boost/config/suffix.hpp 2010-04-21 04:49:21 EDT (Wed, 21 Apr 2010)
@@ -314,6 +314,13 @@
 # define BOOST_NO_INITIALIZER_LISTS
 #endif
 
+//
+// Set BOOST_HAS_RVALUE_REFS when BOOST_NO_RVALUE_REFERENCES is not defined
+//
+#if !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_HAS_RVALUE_REFS)
+#define BOOST_HAS_RVALUE_REFS
+#endif
+
 // BOOST_HAS_ABI_HEADERS
 // This macro gets set if we have headers that fix the ABI,
 // and prevent ODR violations when linking to external libraries:

Modified: trunk/libs/config/test/boost_no_char16_t.ipp
==============================================================================
--- trunk/libs/config/test/boost_no_char16_t.ipp (original)
+++ trunk/libs/config/test/boost_no_char16_t.ipp 2010-04-21 04:49:21 EDT (Wed, 21 Apr 2010)
@@ -1,3 +1,4 @@
+
 // (C) Copyright Beman Dawes 2008
 
 // Use, modification and distribution are subject to the
@@ -14,7 +15,7 @@
 
 int test()
 {
- char16_t c;
+ const char16_t* p = u"abc";
   return 0;
 }
 

Modified: trunk/libs/config/test/boost_no_char32_t.ipp
==============================================================================
--- trunk/libs/config/test/boost_no_char32_t.ipp (original)
+++ trunk/libs/config/test/boost_no_char32_t.ipp 2010-04-21 04:49:21 EDT (Wed, 21 Apr 2010)
@@ -14,7 +14,7 @@
 
 int test()
 {
- char32_t c;
+ const char32_t* p = U"abc";
   return 0;
 }
 

Modified: trunk/libs/config/test/boost_no_initializer_lists.ipp
==============================================================================
--- trunk/libs/config/test/boost_no_initializer_lists.ipp (original)
+++ trunk/libs/config/test/boost_no_initializer_lists.ipp 2010-04-21 04:49:21 EDT (Wed, 21 Apr 2010)
@@ -11,11 +11,18 @@
 // DESCRIPTION: If the compiler does not support C++0x initializer lists
 
 #include <initializer_list>
+#include <vector>
 
 namespace boost_no_initializer_lists {
 
+void f(std::initializer_list<int>)
+{
+}
+
 int test()
 {
+ std::vector<std::string> v{"once", "upon", "a", "time"}; // See C++ std 8.5.4
+ f( { 1, 2, 3, 4 } );
     std::initializer_list<int> x = { 1, 2 };
     return 0;
 }


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