mirror of
https://github.com/abseil/abseil-cpp.git
synced 2026-06-04 12:07:05 +08:00
Workaround symbol resolution bug in Clang 19
Clang 19 seems to see the old usage of absl::string_internal::HasAbslStringify in GoogleTest 1.14.0 and incorrectly resolves absl::HasAbslStringify sometimes. This issue is fixed when a version of GoogleTest that removes absl::string_internal::HasAbslStringify is used. This workaround is ugly but will be removed after the next GoogleTest release. PiperOrigin-RevId: 636993564 Change-Id: Ic166edbd4ddc2c716afbedec34be629cfc988e00
This commit is contained in:
committed by
Copybara-Service
parent
52bc669d0e
commit
48235b8912
@@ -18,6 +18,7 @@
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
#include "absl/base/config.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
|
||||
namespace absl {
|
||||
|
||||
@@ -17,6 +17,9 @@
|
||||
|
||||
#include "absl/strings/has_absl_stringify.h"
|
||||
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
#include "absl/base/config.h"
|
||||
|
||||
namespace absl {
|
||||
@@ -34,7 +37,14 @@ namespace strings_internal {
|
||||
//
|
||||
// https://github.com/google/googletest/pull/4368#issuecomment-1717699895
|
||||
// https://github.com/google/googletest/pull/4368#issuecomment-1717699895
|
||||
using ::absl::HasAbslStringify;
|
||||
template <typename T, typename = void>
|
||||
struct HasAbslStringify : std::false_type {};
|
||||
|
||||
template <typename T>
|
||||
struct HasAbslStringify<
|
||||
T, std::enable_if_t<std::is_void<decltype(AbslStringify(
|
||||
std::declval<strings_internal::UnimplementedSink&>(),
|
||||
std::declval<const T&>()))>::value>> : std::true_type {};
|
||||
|
||||
} // namespace strings_internal
|
||||
|
||||
|
||||
Reference in New Issue
Block a user