Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(370)

Unified Diff: base/bit_cast.h

Issue 1863523005: fix incorrect libstdc++ from GCC >= 5.1 check (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: check for gcc >= 5.1 directly Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/bit_cast.h
diff --git a/base/bit_cast.h b/base/bit_cast.h
index ad38238beb5c08902691dc3a9c8a67784714595c..645bfef003a5fe8d8c869cafd45f3c4d9d64e68e 100644
--- a/base/bit_cast.h
+++ b/base/bit_cast.h
@@ -64,8 +64,7 @@ inline Dest bit_cast(const Source& source) {
static_assert(sizeof(Dest) == sizeof(Source),
"bit_cast requires source and destination to be the same size");
-#if ((defined(__GLIBCXX__) && (__GLIBCXX__ >= 20150422)) || \
- defined(_LIBCPP_VERSION))
+#if (__GNUC__ > 5 || (__GNUC__ == 5 && __GNUC_MINOR__ >= 1))
Nico 2016/04/06 00:39:40 this drops the _libcpp_version check; that's proba
Mostyn Bramley-Moore 2016/04/06 07:54:23 Right- added this back.
// GCC 5.1 contains the first libstdc++ with is_trivially_copyable.
// Assume libc++ Just Works: is_trivially_copyable added on May 13th 2011.
static_assert(std::is_trivially_copyable<Dest>::value,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698