From 02806f4dd5d388ec47efd414732857ecb2ff2b62 Mon Sep 17 00:00:00 2001 From: Mike Klein Date: Tue, 15 Nov 2016 17:57:48 +0000 Subject: [PATCH] Revert "fix google3?" This reverts commit ccb8e8bf38f51e35e0a456c6a724bab96d1b657a. Reason for revert: rolling back a CL this attempted to fix. Original change's description: > fix google3? > > TBR=brianosman@google.com > > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4822 > > Change-Id: I991232e90c6851938151daa59cdeb4a3e22a7f03 > Reviewed-on: https://skia-review.googlesource.com/4822 > Commit-Queue: Mike Klein > Reviewed-by: Brian Osman > Reviewed-by: Mike Klein > TBR=mtklein@chromium.org,brianosman@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I127165f065be45af98528c8ae825e2f0fe5c8b0d Reviewed-on: https://skia-review.googlesource.com/4828 Commit-Queue: Mike Klein Reviewed-by: Mike Klein --- src/core/SkFixedAlloc.h | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/core/SkFixedAlloc.h b/src/core/SkFixedAlloc.h index 504783c2e0..0f450576d9 100644 --- a/src/core/SkFixedAlloc.h +++ b/src/core/SkFixedAlloc.h @@ -15,16 +15,13 @@ #include #include -namespace { - // Before GCC 5, is_trivially_copyable had a pre-standard name. - #if defined(__GLIBCXX__) +// Before GCC 5, is_trivially_copyable had a pre-standard name. +#if defined(__GLIBCXX__) && (__GLIBCXX__ < 20150801) + namespace std { template - using is_trivially_copyable = std::has_trivial_copy_constructor; - #else - template - using is_trivially_copyable = std::is_trivially_copyable; - #endif -} + using is_trivially_copyable = has_trivial_copy_constructor; + } +#endif // SkFixedAlloc allocates POD objects out of a fixed-size buffer. class SkFixedAlloc { @@ -35,7 +32,8 @@ public: // Allocates space suitable for a T. If we can't, returns nullptr. template void* alloc() { - static_assert(std::is_standard_layout::value && is_trivially_copyable::value, ""); + static_assert(std::is_standard_layout ::value + && std::is_trivially_copyable::value, ""); return this->alloc(sizeof(T), alignof(T)); }