Remove gcc-v4.7 support from MemoryIdler v2018.01.08.00
authorYedidya Feldblum <yfeldblum@fb.com>
Mon, 8 Jan 2018 05:40:55 +0000 (21:40 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Mon, 8 Jan 2018 05:49:59 +0000 (21:49 -0800)
Summary:
[Folly] Remove gcc-v4.7 support from `MemoryIdler`.

As of gcc-v4.8, `std::is_trivial<std::chrono::duration<Rep, Period>>::value` holds. We no longer need any extra support.

Reviewed By: meyering

Differential Revision: D6673517

fbshipit-source-id: f28b2d126f113547ebf36c85f9fa37a5d944d65b

folly/detail/MemoryIdler.h

index 1a924b578e4b260a4baa1eecd2d697bdecaa6602..2804ffb8fe8f4aed4a11a6a37c8ed084477b06dc 100644 (file)
 #include <atomic>
 #include <chrono>
 
-#include <folly/Traits.h>
 #include <folly/detail/Futex.h>
 #include <folly/hash/Hash.h>
 #include <folly/synchronization/AtomicStruct.h>
 #include <folly/system/ThreadId.h>
 
-namespace folly {
-
-// gcc 4.7 doesn't do std::is_trivial correctly, override so we can use
-// AtomicStruct<duration>
-template <>
-struct IsTriviallyCopyable<std::chrono::steady_clock::duration>
-  : std::true_type {};
-
-} // namespace folly
-
 namespace folly { namespace detail {
 
 /// MemoryIdler provides helper routines that allow routines to return