projects
/
libcds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
08011ee
)
Fixed passing parameter pack into lambda
author
khizmax
<khizmax@gmail.com>
Thu, 5 Mar 2015 13:10:33 +0000
(16:10 +0300)
committer
khizmax
<khizmax@gmail.com>
Thu, 5 Mar 2015 13:10:33 +0000
(16:10 +0300)
cds/container/bronson_avltree_map_rcu.h
patch
|
blob
|
history
diff --git
a/cds/container/bronson_avltree_map_rcu.h
b/cds/container/bronson_avltree_map_rcu.h
index b0c24749ffd47af3d35e86219fa5a11fa801c42d..8278c6e678b87262a1b99f389b11f9b0c33dcf7a 100644
(file)
--- a/
cds/container/bronson_avltree_map_rcu.h
+++ b/
cds/container/bronson_avltree_map_rcu.h
@@
-236,12
+236,19
@@
namespace cds { namespace container {
template <typename K, typename... Args>
bool emplace( K&& key, Args&&... args )
{
template <typename K, typename... Args>
bool emplace( K&& key, Args&&... args )
{
+ auto helper = []( Args&&... args ) -> mapped_type *
+ {
+ return cxx_allocator().New( std::forward<Args>(args)...);
+ };
+
return base_class::do_update( key, key_comparator(),
return base_class::do_update( key, key_comparator(),
- [
&]( node_type * pNode ) -> mapped_type
*
+ [
=]( node_type * pNode ) -> mapped_type
*
{
assert( pNode->m_pValue.load( memory_model::memory_order_relaxed ) == nullptr );
CDS_UNUSED( pNode );
{
assert( pNode->m_pValue.load( memory_model::memory_order_relaxed ) == nullptr );
CDS_UNUSED( pNode );
- return cxx_allocator().New( std::forward<Args>(args)...);
+ return helper( args... );
+ // gcc/clang error: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47226
+ //return cxx_allocator().New( std::forward<Args>(args)...);
},
update_flags::allow_insert
) == update_flags::result_inserted;
},
update_flags::allow_insert
) == update_flags::result_inserted;