Revert "Merge from branch 'develop' into 'master'"

This reverts commit 83b3b703e0.
This commit is contained in:
Peter Dimov
2014-02-11 01:29:02 +02:00
parent 83b3b703e0
commit f837c7f56c
32 changed files with 2087 additions and 1129 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2014 Glen Joseph Fernandes
* Copyright (c) 2012 Glen Joseph Fernandes
* glenfe at live dot com
*
* Distributed under the Boost Software License,
@@ -12,18 +12,15 @@
class type {
public:
static unsigned int instances;
explicit type() {
if (instances == 5) {
throw true;
}
instances++;
}
~type() {
instances--;
}
private:
type(const type&);
type& operator=(const type&);
@@ -39,7 +36,6 @@ int main() {
} catch (...) {
BOOST_TEST(type::instances == 0);
}
BOOST_TEST(type::instances == 0);
try {
boost::allocate_shared<type[][2]>(std::allocator<type>(), 3);
@@ -47,7 +43,7 @@ int main() {
} catch (...) {
BOOST_TEST(type::instances == 0);
}
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
BOOST_TEST(type::instances == 0);
try {
boost::allocate_shared<type[6]>(std::allocator<type>());
@@ -55,7 +51,6 @@ int main() {
} catch (...) {
BOOST_TEST(type::instances == 0);
}
BOOST_TEST(type::instances == 0);
try {
boost::allocate_shared<type[3][2]>(std::allocator<type>());
@@ -63,7 +58,7 @@ int main() {
} catch (...) {
BOOST_TEST(type::instances == 0);
}
#endif
BOOST_TEST(type::instances == 0);
try {
boost::allocate_shared_noinit<type[]>(std::allocator<type>(), 6);
@@ -71,7 +66,6 @@ int main() {
} catch (...) {
BOOST_TEST(type::instances == 0);
}
BOOST_TEST(type::instances == 0);
try {
boost::allocate_shared_noinit<type[][2]>(std::allocator<type>(), 3);
@@ -79,22 +73,5 @@ int main() {
} catch (...) {
BOOST_TEST(type::instances == 0);
}
BOOST_TEST(type::instances == 0);
try {
boost::allocate_shared_noinit<type[6]>(std::allocator<type>());
BOOST_ERROR("allocate_shared_noinit did not throw");
} catch (...) {
BOOST_TEST(type::instances == 0);
}
BOOST_TEST(type::instances == 0);
try {
boost::allocate_shared_noinit<type[3][2]>(std::allocator<type>());
BOOST_ERROR("allocate_shared_noinit did not throw");
} catch (...) {
BOOST_TEST(type::instances == 0);
}
return boost::report_errors();
}