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 <mtklein@chromium.org>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
>
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 <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
diff --git a/src/core/SkFixedAlloc.h b/src/core/SkFixedAlloc.h
index 504783c..0f45057 100644
--- a/src/core/SkFixedAlloc.h
+++ b/src/core/SkFixedAlloc.h
@@ -15,16 +15,13 @@
#include <utility>
#include <vector>
-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 <typename T>
- using is_trivially_copyable = std::has_trivial_copy_constructor<T>;
- #else
- template <typename T>
- using is_trivially_copyable = std::is_trivially_copyable<T>;
- #endif
-}
+ using is_trivially_copyable = has_trivial_copy_constructor<T>;
+ }
+#endif
// SkFixedAlloc allocates POD objects out of a fixed-size buffer.
class SkFixedAlloc {
@@ -35,7 +32,8 @@
// Allocates space suitable for a T. If we can't, returns nullptr.
template <typename T>
void* alloc() {
- static_assert(std::is_standard_layout<T>::value && is_trivially_copyable<T>::value, "");
+ static_assert(std::is_standard_layout <T>::value
+ && std::is_trivially_copyable<T>::value, "");
return this->alloc(sizeof(T), alignof(T));
}