Skip to content
Snippets Groups Projects
Commit fa42f98b authored by Martin Nolte's avatar Martin Nolte
Browse files

adapt to interface change for polyallocator

[[Imported from SVN: r5989]]
parent bc0a4771
No related branches found
No related tags found
No related merge requests found
......@@ -48,27 +48,21 @@ struct G
alloc_(alloc)
{
if( k>0 )
{
B *b = alloc_.template allocate< B >();
alloc_.construct( b, B( k ) );
a_ = b;
}
a_ = alloc_.create( B( k ) );
else
{
C *c = alloc_.template allocate< C >();
alloc_.construct( c, C() );
a_ = c;
}
a_ = alloc_.create( C() );
}
~G()
{
alloc_.destroy( a_ );
alloc_.deallocate( a_ );
}
void test()
{
a_->test();
}
private:
Allocator alloc_;
A *a_;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment