projects
/
libcds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove CDS_EMPLACE_SUPPORT macro and unused code
[libcds.git]
/
cds
/
container
/
treiber_stack.h
diff --git
a/cds/container/treiber_stack.h
b/cds/container/treiber_stack.h
index 0360ad9e82205d681326acb28c74b9c54d9d7d0a..15465403ac3877f87fbb19a30ac28a744f922642 100644
(file)
--- 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 )
{}
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)...)
{}
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;
};
typedef typename options::allocator::template rebind<node_type>::other allocator_type;
@@
-167,13
+162,11
@@
namespace cds { namespace container {
{
return cxx_allocator().New( val );
}
{
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 )... );
}
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 )
{
static void free_node( node_type * p )
{
@@
-223,12
+216,7
@@
namespace cds { namespace container {
return false;
}
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 )
{
template <typename... Args>
bool emplace( Args&&... args )
{
@@
-239,7
+227,6
@@
namespace cds { namespace container {
}
return false;
}
}
return false;
}
-# endif
/// Pop an item from the stack
/**
/// Pop an item from the stack
/**