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.

[SVN r61453]
This commit is contained in:
John Maddock
2010-04-21 08:49:21 +00:00
parent 0c1feee19f
commit 4464cf9f47
5 changed files with 20 additions and 5 deletions

View File

@ -162,13 +162,12 @@
#define BOOST_NO_LAMBDAS #define BOOST_NO_LAMBDAS
#define BOOST_NO_RVALUE_REFERENCES #define BOOST_NO_RVALUE_REFERENCES
#define BOOST_NO_STATIC_ASSERT #define BOOST_NO_STATIC_ASSERT
#define BOOST_NO_CHAR16_T
#define BOOST_NO_CHAR32_T
#define BOOST_NO_INITIALIZER_LISTS
#define BOOST_NO_NULLPTR #define BOOST_NO_NULLPTR
#endif // _MSC_VER < 1600 #endif // _MSC_VER < 1600
// C++0x features not supported by any versions // 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_CONCEPTS
#define BOOST_NO_CONSTEXPR #define BOOST_NO_CONSTEXPR
#define BOOST_NO_DEFAULTED_FUNCTIONS #define BOOST_NO_DEFAULTED_FUNCTIONS
@ -177,6 +176,7 @@
#define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS #define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
#define BOOST_NO_EXTERN_TEMPLATE #define BOOST_NO_EXTERN_TEMPLATE
#define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS #define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
#define BOOST_NO_INITIALIZER_LISTS
#define BOOST_NO_RAW_LITERALS #define BOOST_NO_RAW_LITERALS
#define BOOST_NO_SCOPED_ENUMS #define BOOST_NO_SCOPED_ENUMS
#define BOOST_NO_SFINAE_EXPR #define BOOST_NO_SFINAE_EXPR

View File

@ -314,6 +314,13 @@
# define BOOST_NO_INITIALIZER_LISTS # define BOOST_NO_INITIALIZER_LISTS
#endif #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 // BOOST_HAS_ABI_HEADERS
// This macro gets set if we have headers that fix the ABI, // This macro gets set if we have headers that fix the ABI,
// and prevent ODR violations when linking to external libraries: // and prevent ODR violations when linking to external libraries:

View File

@ -1,3 +1,4 @@
// (C) Copyright Beman Dawes 2008 // (C) Copyright Beman Dawes 2008
// Use, modification and distribution are subject to the // Use, modification and distribution are subject to the
@ -14,7 +15,7 @@ namespace boost_no_char16_t {
int test() int test()
{ {
char16_t c; const char16_t* p = u"abc";
return 0; return 0;
} }

View File

@ -14,7 +14,7 @@ namespace boost_no_char32_t {
int test() int test()
{ {
char32_t c; const char32_t* p = U"abc";
return 0; return 0;
} }

View File

@ -11,11 +11,18 @@
// DESCRIPTION: If the compiler does not support C++0x initializer lists // DESCRIPTION: If the compiler does not support C++0x initializer lists
#include <initializer_list> #include <initializer_list>
#include <vector>
namespace boost_no_initializer_lists { namespace boost_no_initializer_lists {
void f(std::initializer_list<int>)
{
}
int test() 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 }; std::initializer_list<int> x = { 1, 2 };
return 0; return 0;
} }