From c2e00d341913bf03b4597ade5b056042e23e8c58 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Wed, 25 Jul 2018 09:37:23 -0700 Subject: Export of internal Abseil changes. -- eb6cc81ef7e89e10fc9df47418af93e22fd116d2 by Abseil Team : Workaround clang bug https://bugs.llvm.org/show_bug.cgi?id=38289 PiperOrigin-RevId: 206006290 -- 509e9829295bfc429b82de42f2e073c756ea5709 by Jon Cohen : Remove make_unique ambiguity when using gcc 4.9 in C++14 mode. gcc 4.9.4 has __cplusplus at 201300L instead of 201402L when in C++14 mode, I guess indicating incomplete support. Anyways, it causes a problem with this check as in c++14 mode in old gcc we were defining absl::make_unique when std::make_unique was present PiperOrigin-RevId: 205886589 GitOrigin-RevId: eb6cc81ef7e89e10fc9df47418af93e22fd116d2 Change-Id: I9acf3f3d0fd3b0b46ae099821f3bf21b72c28b2b --- absl/memory/memory.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'absl/memory') diff --git a/absl/memory/memory.h b/absl/memory/memory.h index c43e1566..f207169a 100644 --- a/absl/memory/memory.h +++ b/absl/memory/memory.h @@ -83,7 +83,11 @@ struct MakeUniqueResult { } // namespace memory_internal -#if __cplusplus >= 201402L || defined(_MSC_VER) +// gcc 4.8 has __cplusplus at 201301 but doesn't define make_unique. Other +// supported compilers either just define __cplusplus as 201103 but have +// make_unique (msvc), or have make_unique whenever __cplusplus > 201103 (clang) +#if (__cplusplus > 201103L || defined(_MSC_VER)) && \ + !(defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ == 8) using std::make_unique; #else // ----------------------------------------------------------------------------- -- cgit v1.2.3