diff options
author | Hidehiko Abe <hidehiko@chromium.org> | 2018-02-23 18:50:41 +0900 |
---|---|---|
committer | Qijiang Fan <fqj@google.com> | 2020-06-05 08:36:24 +0900 |
commit | 9e7779de78154451377ad367af043cb13ff8e280 (patch) | |
tree | 5e4e2f7577a308edc4a16f35d81ebe0689dc49b4 /base/optional.h | |
parent | b4b2efcc5f7e28da1a8c4f8fb2dd1784a3683c2e (diff) | |
download | libchrome-9e7779de78154451377ad367af043cb13ff8e280.tar.gz |
Workaround for g++7 is_trivially_copy_constructible failure.
cf) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80654
Please see also crbug.com/784732#27 for details.
BUG=784732
TEST=Some with GCC.
Change-Id: I0a6d28d9c26ac9ed026d137e17fddbe86586f1e1
Reviewed-on: https://chromium-review.googlesource.com/927942
Commit-Queue: Hidehiko Abe <hidehiko@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538740}
CrOS-Libchrome-Original-Commit: 4d8468a07f374c11425494271256151fb6fe0c34
Diffstat (limited to 'base/optional.h')
-rw-r--r-- | base/optional.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/base/optional.h b/base/optional.h index d7c9db7c34..e3be1c89eb 100644 --- a/base/optional.h +++ b/base/optional.h @@ -9,6 +9,7 @@ #include <utility> #include "base/logging.h" +#include "base/template_util.h" namespace base { @@ -128,7 +129,7 @@ struct OptionalStorageBase<T, true /* trivially destructible */> { // compiler generated constexpr {copy,move} constructors). Note that // placement-new is prohibited in constexpr. template <typename T, - bool = std::is_trivially_copy_constructible<T>::value, + bool = 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 |