From 830651a4c7a27ca9293a28cfa873e7758d033479 Mon Sep 17 00:00:00 2001 From: WenTao Ou Date: Tue, 30 Apr 2024 03:19:31 +0800 Subject: [PATCH] Use `nostd::enable_if_t` instead of `std::enable_if_t` (#2648) --- .../include/opentelemetry/exporters/etw/etw_properties.h | 9 +++++---- .../sdk/instrumentationscope/instrumentation_scope.h | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/exporters/etw/include/opentelemetry/exporters/etw/etw_properties.h b/exporters/etw/include/opentelemetry/exporters/etw/etw_properties.h index f35b5f11b4..b2de664d12 100644 --- a/exporters/etw/include/opentelemetry/exporters/etw/etw_properties.h +++ b/exporters/etw/include/opentelemetry/exporters/etw/etw_properties.h @@ -7,6 +7,7 @@ #include "opentelemetry/common/key_value_iterable_view.h" #include +#include #include #include #include @@ -106,7 +107,7 @@ class PropertyValue : public PropertyVariant * @param vec Vector of integral type primitives to convert to span. * @return Span of integral type primitives. */ - template ::value, bool> = true> + template ::value, bool> = true> static nostd::span to_span(const std::vector &vec) { nostd::span result(vec.data(), vec.size()); @@ -119,7 +120,7 @@ class PropertyValue : public PropertyVariant * @param vec Vector of float type primitives to convert to span. * @return Span of float type primitives. */ - template ::value, bool> = true> + template ::value, bool> = true> static nostd::span to_span(const std::vector &vec) { nostd::span result(vec.data(), vec.size()); @@ -139,7 +140,7 @@ class PropertyValue : public PropertyVariant * @param v * @return */ - template ::value, bool> = true> + template ::value, bool> = true> PropertyValue(TInteger number) : PropertyVariant(number) {} @@ -148,7 +149,7 @@ class PropertyValue : public PropertyVariant * @param v * @return */ - template ::value, bool> = true> + template ::value, bool> = true> PropertyValue(TFloat number) : PropertyVariant(double(number)) {} diff --git a/sdk/include/opentelemetry/sdk/instrumentationscope/instrumentation_scope.h b/sdk/include/opentelemetry/sdk/instrumentationscope/instrumentation_scope.h index 4f7c9069bf..1bf0facaa6 100644 --- a/sdk/include/opentelemetry/sdk/instrumentationscope/instrumentation_scope.h +++ b/sdk/include/opentelemetry/sdk/instrumentationscope/instrumentation_scope.h @@ -8,6 +8,7 @@ #include "opentelemetry/common/key_value_iterable_view.h" #include "opentelemetry/nostd/string_view.h" +#include "opentelemetry/nostd/type_traits.h" #include "opentelemetry/nostd/unique_ptr.h" #include "opentelemetry/nostd/variant.h" #include "opentelemetry/sdk/common/attribute_utils.h" @@ -73,7 +74,7 @@ class InstrumentationScope */ template < class ArgumentType, - std::enable_if_t::value> + nostd::enable_if_t::value> * = nullptr> static nostd::unique_ptr Create(nostd::string_view name, nostd::string_view version,