Use a different workaround for supporting noinit_adaptor in C++03

This commit is contained in:
Glen Fernandes
2022-03-15 11:58:38 -04:00
parent 4defdfd233
commit 5e0ff1680f
5 changed files with 72 additions and 68 deletions

View File

@@ -26,16 +26,6 @@ struct A2 {
};
#endif
template<class T>
struct A3 {
typedef T value_type;
A3() { }
template<class U>
void construct(U* p) {
::new((void*)p) U(1);
}
};
int main()
{
{
@@ -52,11 +42,5 @@ int main()
BOOST_TEST_EQ(i, 6);
}
#endif
{
A3<int> a;
int i = 0;
boost::allocator_construct(a, &i);
BOOST_TEST_EQ(i, 1);
}
return boost::report_errors();
}