Commit 94860dee authored by Joe Loser's avatar Joe Loser Committed by Facebook Github Bot

Use std::is_trivially_destructible instead of boost::has_trivial_destructor (#1003)

Summary:
- Use `std::is_trivially_destructible` instead of
  `boost::has_trivial_destructor` in a few places.
Pull Request resolved: https://github.com/facebook/folly/pull/1003

Reviewed By: lbrandy

Differential Revision: D13754694

Pulled By: yfeldblum

fbshipit-source-id: b32dbc901fd7c9cae681ac3436cc71ff075f30ec
parent 9e3f865f
......@@ -24,8 +24,6 @@
#include <system_error>
#include <type_traits>
#include <boost/type_traits/has_trivial_destructor.hpp>
#include <folly/Conv.h>
#include <folly/Likely.h>
#include <folly/Random.h>
......@@ -136,8 +134,8 @@ template <
typename Hash = std::hash<Key>,
typename KeyEqual = std::equal_to<Key>,
bool SkipKeyValueDeletion =
(boost::has_trivial_destructor<Key>::value &&
boost::has_trivial_destructor<Value>::value),
(std::is_trivially_destructible<Key>::value &&
std::is_trivially_destructible<Value>::value),
template <typename> class Atom = std::atomic,
typename IndexType = uint32_t,
typename Allocator = folly::detail::MMapAlloc>
......@@ -478,8 +476,8 @@ template <
typename Hash = std::hash<Key>,
typename KeyEqual = std::equal_to<Key>,
bool SkipKeyValueDeletion =
(boost::has_trivial_destructor<Key>::value &&
boost::has_trivial_destructor<Value>::value),
(std::is_trivially_destructible<Key>::value &&
std::is_trivially_destructible<Value>::value),
template <typename> class Atom = std::atomic,
typename Allocator = folly::detail::MMapAlloc>
using AtomicUnorderedInsertMap64 = AtomicUnorderedInsertMap<
......
......@@ -28,7 +28,6 @@
#include <vector>
#include <boost/random.hpp>
#include <boost/type_traits.hpp>
#include <glog/logging.h>
#include <folly/Memory.h>
......@@ -83,7 +82,7 @@ class SkipListNode {
template <typename NodeAlloc>
struct DestroyIsNoOp : StrictConjunction<
AllocatorHasTrivialDeallocate<NodeAlloc>,
boost::has_trivial_destructor<SkipListNode>> {};
std::is_trivially_destructible<SkipListNode>> {};
// copy the head node to a new head node assuming lock acquired
SkipListNode* copyHead(SkipListNode* node) {
......
......@@ -109,8 +109,8 @@ using UIM = AtomicUnorderedInsertMap<
Value,
std::hash<Key>,
std::equal_to<Key>,
(boost::has_trivial_destructor<Key>::value &&
boost::has_trivial_destructor<Value>::value),
(std::is_trivially_destructible<Key>::value &&
std::is_trivially_destructible<Value>::value),
Atom,
IndexType,
Allocator>;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment