Skip to content

Commit 762ece2

Browse files
committed
try suggestion from owent
Signed-off-by: Rohit Agrawal <rohit.agrawal@databricks.com>
1 parent 602e1a6 commit 762ece2

File tree

1 file changed

+25
-26
lines changed

1 file changed

+25
-26
lines changed

bazel/io_opentelemetry_cpp.patch

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,30 @@
1-
From b0825190258f28a7e72b62dfc00835cc277a059e Mon Sep 17 00:00:00 2001
1+
From 6c13d723cdbbc3c3034f15e26871a41811ef505a Mon Sep 17 00:00:00 2001
22
From: Rohit Agrawal <rohit.agrawal@databricks.com>
33
Date: Fri, 25 Apr 2025 19:03:41 -0700
4-
Subject: [PATCH] Patches
4+
Subject: [PATCH] Patch
55

6+
Signed-off-by: Rohit Agrawal <rohit.agrawal@databricks.com>
67
---
7-
api/include/opentelemetry/nostd/type_traits.h | 4 ++--
8-
1 file changed, 2 insertions(+), 2 deletions(-)
8+
api/include/opentelemetry/config.h | 9 +++------
9+
1 file changed, 3 insertions(+), 6 deletions(-)
910

10-
diff --git a/api/include/opentelemetry/nostd/type_traits.h b/api/include/opentelemetry/nostd/type_traits.h
11-
index 3a64b5db1a..2dcf63884e 100644
12-
--- a/api/include/opentelemetry/nostd/type_traits.h
13-
+++ b/api/include/opentelemetry/nostd/type_traits.h
14-
@@ -142,7 +142,7 @@ using std::is_trivially_move_constructible;
15-
template <typename T>
16-
struct is_trivially_copy_constructible
17-
{
18-
- static constexpr bool value = std::is_copy_constructible<T>::value && __has_trivial_copy(T);
19-
+ static constexpr bool value = std::is_copy_constructible<T>::value && __is_trivially_assignable(T&, const T&);
20-
};
21-
22-
template <typename T>
23-
@@ -154,7 +154,7 @@ struct is_trivially_move_constructible
24-
template <typename T>
25-
struct is_trivially_copy_assignable
26-
{
27-
- static constexpr bool value = std::is_copy_assignable<T>::value && __has_trivial_assign(T);
28-
+ static constexpr bool value = std::is_copy_assignable<T>::value && __is_trivially_assignable(T&, const T&);
29-
};
30-
31-
template <typename T>
11+
diff --git a/api/include/opentelemetry/config.h b/api/include/opentelemetry/config.h
12+
index 21a2947e28..c41f2e7ef8 100644
13+
--- a/api/include/opentelemetry/config.h
14+
+++ b/api/include/opentelemetry/config.h
15+
@@ -3,12 +3,9 @@
16+
17+
#pragma once
18+
19+
-#ifndef __has_include
20+
-# define OPENTELEMETRY_HAS_INCLUDE(x) 0
21+
-#else
22+
-# define OPENTELEMETRY_HAS_INCLUDE(x) __has_include(x)
23+
-#endif
24+
+#include <type_traits> // IWYU pragma: keep
25+
26+
-#if !defined(__GLIBCXX__) || OPENTELEMETRY_HAS_INCLUDE(<codecvt>) // >= libstdc++-5
27+
+#if !defined(__GLIBCXX__) || (defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE >= 7) || \
28+
+ (defined(__GLIBCXX__) && __GLIBCXX__ >= 20150422) // >= libstdc++-5
29+
# define OPENTELEMETRY_TRIVIALITY_TYPE_TRAITS
30+
#endif

0 commit comments

Comments
 (0)