forked from boostorg/config
Tweak VC10 configuration settings.
Update BOOST_NO_DECLTYPE test with VC10 bug case. [SVN r61432]
This commit is contained in:
@@ -159,31 +159,30 @@
|
|||||||
#if _MSC_VER < 1600
|
#if _MSC_VER < 1600
|
||||||
#define BOOST_NO_AUTO_DECLARATIONS
|
#define BOOST_NO_AUTO_DECLARATIONS
|
||||||
#define BOOST_NO_AUTO_MULTIDECLARATIONS
|
#define BOOST_NO_AUTO_MULTIDECLARATIONS
|
||||||
#define BOOST_NO_DECLTYPE
|
|
||||||
#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
|
||||||
#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
|
||||||
|
#define BOOST_NO_DECLTYPE
|
||||||
#define BOOST_NO_DELETED_FUNCTIONS
|
#define BOOST_NO_DELETED_FUNCTIONS
|
||||||
#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_NULLPTR
|
|
||||||
#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
|
||||||
#define BOOST_NO_TEMPLATE_ALIASES
|
#define BOOST_NO_TEMPLATE_ALIASES
|
||||||
#define BOOST_NO_UNICODE_LITERALS
|
#define BOOST_NO_UNICODE_LITERALS
|
||||||
#define BOOST_NO_VARIADIC_TEMPLATES
|
#define BOOST_NO_VARIADIC_TEMPLATES
|
||||||
|
|
||||||
//
|
//
|
||||||
// prefix and suffix headers:
|
// prefix and suffix headers:
|
||||||
//
|
//
|
||||||
|
@@ -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
|
||||||
@@ -12,10 +13,34 @@
|
|||||||
|
|
||||||
namespace boost_no_decltype {
|
namespace boost_no_decltype {
|
||||||
|
|
||||||
|
struct test_class
|
||||||
|
{
|
||||||
|
test_class() {}
|
||||||
|
};
|
||||||
|
|
||||||
|
test_class get_test_class()
|
||||||
|
{
|
||||||
|
return test_class();
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename F>
|
||||||
|
void baz(F f)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// Strangely VC-10 deduces the return type of F
|
||||||
|
// to be "test_class&". Remove the constructor
|
||||||
|
// from test_class and then decltype does work OK!!
|
||||||
|
//
|
||||||
|
typedef decltype(f()) res;
|
||||||
|
res r;
|
||||||
|
}
|
||||||
|
|
||||||
int test()
|
int test()
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
decltype(i) j;
|
decltype(i) j;
|
||||||
|
decltype(get_test_class()) k;
|
||||||
|
baz(get_test_class);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user