X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2FConcurrentSkipList-inl.h;h=a0dab2f3c92094d2c6dc7503f962796b96e44ef3;hb=56ef367e4b0cf8fdb1265f0f6d9a40e7fe855f9a;hp=e4144bcbfb57dfaa035ace57a2f163ac62f4dbcf;hpb=dee8a5180aa542d98d1b71c74f83a006e4627952;p=folly.git diff --git a/folly/ConcurrentSkipList-inl.h b/folly/ConcurrentSkipList-inl.h index e4144bcb..a0dab2f3 100644 --- a/folly/ConcurrentSkipList-inl.h +++ b/folly/ConcurrentSkipList-inl.h @@ -70,10 +70,9 @@ class SkipListNode : private boost::noncopyable { } template - static constexpr bool destroyIsNoOp() { - return IsArenaAllocator::value && - boost::has_trivial_destructor::value; - } + struct DestroyIsNoOp : std::integral_constant::value && + boost::has_trivial_destructor::value> { }; // copy the head node to a new head node assuming lock acquired SkipListNode* copyHead(SkipListNode* node) { @@ -230,7 +229,7 @@ class NodeRecycler; template class NodeRecycler()>::type> { + !NodeType::template DestroyIsNoOp::value>::type> { public: explicit NodeRecycler(const NodeAlloc& alloc) : refs_(0), dirty_(false), alloc_(alloc) { lock_.init(); } @@ -316,7 +315,7 @@ class NodeRecycler class NodeRecycler()>::type> { + NodeType::template DestroyIsNoOp::value>::type> { public: explicit NodeRecycler(const NodeAlloc& alloc) : alloc_(alloc) { }