Commit 029e8ab9 authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[base] Remove hack for gcc < 5

Node now requires gcc >=6.3, and we do not test on gcc <5.4 any more.
Thus remove a hack for gcc <5.

R=machenbach@chromium.org

Bug: v8:9686
Change-Id: I503c6b76d40499bbe45fb83996e0dfebf86f3395
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1786281Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63569}
parent b096eb55
......@@ -131,21 +131,8 @@ struct OptionalStorageBase<T, true /* trivially destructible */> {
// the condition of constexpr-ness is satisfied because the base class also has
// compiler generated constexpr {copy,move} constructors). Note that
// placement-new is prohibited in constexpr.
#if defined(__GNUC__) && __GNUC__ < 5
// gcc <5 does not implement std::is_trivially_copy_constructible.
// Conservatively assume false for this configuration.
// TODO(clemensh): Remove this once we drop support for gcc <5.
#define TRIVIALLY_COPY_CONSTRUCTIBLE(T) false
#define TRIVIALLY_MOVE_CONSTRUCTIBLE(T) false
#else
#define TRIVIALLY_COPY_CONSTRUCTIBLE(T) \
std::is_trivially_copy_constructible<T>::value
#define TRIVIALLY_MOVE_CONSTRUCTIBLE(T) \
std::is_trivially_move_constructible<T>::value
#endif
template <typename T, bool = TRIVIALLY_COPY_CONSTRUCTIBLE(T),
bool = TRIVIALLY_MOVE_CONSTRUCTIBLE(T)>
#undef TRIVIALLY_COPY_CONSTRUCTIBLE
template <typename T, bool = std::is_trivially_copy_constructible<T>::value,
bool = std::is_trivially_move_constructible<T>::value>
struct OptionalStorage : OptionalStorageBase<T> {
// This is no trivially {copy,move} constructible case. Other cases are
// defined below as specializations.
......
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