node_type( const value_type& val )
: m_value( val )
{}
-# ifdef CDS_EMPLACE_SUPPORT
template <typename... Args>
node_type( Args&&... args )
: m_value( std::forward<Args>(args)...)
{}
-# else
- node_type()
- {}
-# endif
};
typedef typename options::allocator::template rebind<node_type>::other allocator_type;
{
return cxx_allocator().New( val );
}
-# ifdef CDS_EMPLACE_SUPPORT
template <typename... Args>
static node_type * alloc_node_move( Args&&... args )
{
return cxx_allocator().MoveNew( std::forward<Args>( args )... );
}
-# endif
static void free_node( node_type * p )
{
return false;
}
-# ifdef CDS_EMPLACE_SUPPORT
- /// Pushes data of type \ref value_type constructed with <tt>std::forward<Args>(args)...</tt>
- /**
- This function is available only for compiler that supports
- variadic template and move semantics
- */
+ /// Pushes data of type \ref value_type created from <tt>std::forward<Args>(args)...</tt>
template <typename... Args>
bool emplace( Args&&... args )
{
}
return false;
}
-# endif
/// Pop an item from the stack
/**