[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/+/1786281
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63569}
This commit is contained in:
Clemens Hammacher 2019-09-05 11:05:32 +02:00 committed by Commit Bot
parent b096eb5552
commit 029e8ab9b0

View File

@ -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.