Tweak VC10 configuration settings.

Update BOOST_NO_DECLTYPE test with VC10 bug case.

[SVN r61432]
This commit is contained in:
John Maddock
2010-04-20 17:26:06 +00:00
parent 18af1c798d
commit e2e2e4a6fb
2 changed files with 30 additions and 6 deletions
+25
View File
@@ -1,3 +1,4 @@
// (C) Copyright Beman Dawes 2008
// Use, modification and distribution are subject to the
@@ -12,10 +13,34 @@
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 i;
decltype(i) j;
decltype(get_test_class()) k;
baz(get_test_class);
return 0;
}