X-Git-Url: http://plrg.eecs.uci.edu/git/?p=libcds.git;a=blobdiff_plain;f=cds%2Fcontainer%2Ftreiber_stack.h;h=15465403ac3877f87fbb19a30ac28a744f922642;hp=0360ad9e82205d681326acb28c74b9c54d9d7d0a;hb=bab1583cb2db30355c138a507943cd5ad068ccf4;hpb=97833f7d4af21c992583b650232af8a8c852064c diff --git a/cds/container/treiber_stack.h b/cds/container/treiber_stack.h index 0360ad9e..15465403 100644 --- a/cds/container/treiber_stack.h +++ b/cds/container/treiber_stack.h @@ -49,15 +49,10 @@ namespace cds { namespace container { node_type( const value_type& val ) : m_value( val ) {} -# ifdef CDS_EMPLACE_SUPPORT template node_type( Args&&... args ) : m_value( std::forward(args)...) {} -# else - node_type() - {} -# endif }; typedef typename options::allocator::template rebind::other allocator_type; @@ -167,13 +162,11 @@ namespace cds { namespace container { { return cxx_allocator().New( val ); } -# ifdef CDS_EMPLACE_SUPPORT template static node_type * alloc_node_move( Args&&... args ) { return cxx_allocator().MoveNew( std::forward( args )... ); } -# endif static void free_node( node_type * p ) { @@ -223,12 +216,7 @@ namespace cds { namespace container { return false; } -# ifdef CDS_EMPLACE_SUPPORT - /// Pushes data of type \ref value_type constructed with std::forward(args)... - /** - This function is available only for compiler that supports - variadic template and move semantics - */ + /// Pushes data of type \ref value_type created from std::forward(args)... template bool emplace( Args&&... args ) { @@ -239,7 +227,6 @@ namespace cds { namespace container { } return false; } -# endif /// Pop an item from the stack /**