diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2024-09-08 09:20:21 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2024-09-08 17:48:08 +0000 |
commit | 66edcb86f65117393297fedb6a5e661f9e3db735 (patch) | |
tree | 4392bcfe10430386a0e9b968e641aeed97cfbc71 | |
parent | dd9acacd6015fdb57737cf326d9810e4f639e3e7 (diff) | |
download | ports-66edcb86f65117393297fedb6a5e661f9e3db735.tar.gz ports-66edcb86f65117393297fedb6a5e661f9e3db735.zip |
devel/opentelemetry-cpp: fix build with clang 19
Clang 19 now implements CWG 96 [1], which requires a template argument
list after a 'template' keyword, resulting in errors similar to:
/wrkdirs/usr/ports/devel/opentelemetry-cpp/work/opentelemetry-cpp-1.16.1/api/include/opentelemetry/logs/logger_type_traits.h:169:69: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
169 | return LogRecordSetterTrait<common::KeyValueIterable>::template Set(
| ^
/wrkdirs/usr/ports/devel/opentelemetry-cpp/work/opentelemetry-cpp-1.16.1/api/include/opentelemetry/logs/logger.h:76:89: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
76 | detail::LogRecordSetterTrait<typename std::decay<ArgumentType>::type>::template Set(
| ^
/wrkdirs/usr/ports/devel/opentelemetry-cpp/work/opentelemetry-cpp-1.16.1/api/include/opentelemetry/logs/event_logger.h:69:89: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
69 | detail::LogRecordSetterTrait<typename std::decay<ArgumentType>::type>::template Set(
| ^
In these cases, appending "<>" is enough to satisfy the constraint.
PR: 281359
Approved by: osa (maintainer)
MFH: 2024Q3
(cherry picked from commit 676864fd474bdd6ec1d74496d0a58d9a5a046601)
3 files changed, 33 insertions, 0 deletions
diff --git a/devel/opentelemetry-cpp/files/patch-api_include_opentelemetry_logs_event__logger.h b/devel/opentelemetry-cpp/files/patch-api_include_opentelemetry_logs_event__logger.h new file mode 100644 index 000000000000..332f955f1bdf --- /dev/null +++ b/devel/opentelemetry-cpp/files/patch-api_include_opentelemetry_logs_event__logger.h @@ -0,0 +1,11 @@ +--- api/include/opentelemetry/logs/event_logger.h.orig 2024-07-17 20:04:10 UTC ++++ api/include/opentelemetry/logs/event_logger.h +@@ -66,7 +66,7 @@ class EventLogger (public) + nostd::unique_ptr<LogRecord> log_record = delegate_logger->CreateLogRecord(); + + IgnoreTraitResult( +- detail::LogRecordSetterTrait<typename std::decay<ArgumentType>::type>::template Set( ++ detail::LogRecordSetterTrait<typename std::decay<ArgumentType>::type>::template Set<>( + log_record.get(), std::forward<ArgumentType>(args))...); + + EmitEvent(event_name, std::move(log_record)); diff --git a/devel/opentelemetry-cpp/files/patch-api_include_opentelemetry_logs_logger.h b/devel/opentelemetry-cpp/files/patch-api_include_opentelemetry_logs_logger.h new file mode 100644 index 000000000000..dc1c2541b51e --- /dev/null +++ b/devel/opentelemetry-cpp/files/patch-api_include_opentelemetry_logs_logger.h @@ -0,0 +1,11 @@ +--- api/include/opentelemetry/logs/logger.h.orig 2024-07-17 20:04:10 UTC ++++ api/include/opentelemetry/logs/logger.h +@@ -73,7 +73,7 @@ class Logger (public) + } + + IgnoreTraitResult( +- detail::LogRecordSetterTrait<typename std::decay<ArgumentType>::type>::template Set( ++ detail::LogRecordSetterTrait<typename std::decay<ArgumentType>::type>::template Set<>( + log_record.get(), std::forward<ArgumentType>(args))...); + + EmitLogRecord(std::move(log_record)); diff --git a/devel/opentelemetry-cpp/files/patch-api_include_opentelemetry_logs_logger__type__traits.h b/devel/opentelemetry-cpp/files/patch-api_include_opentelemetry_logs_logger__type__traits.h new file mode 100644 index 000000000000..46d4327274a5 --- /dev/null +++ b/devel/opentelemetry-cpp/files/patch-api_include_opentelemetry_logs_logger__type__traits.h @@ -0,0 +1,11 @@ +--- api/include/opentelemetry/logs/logger_type_traits.h.orig 2024-07-17 20:04:10 UTC ++++ api/include/opentelemetry/logs/logger_type_traits.h +@@ -166,7 +166,7 @@ struct LogRecordSetterTrait + * = nullptr> + inline static LogRecord *Set(LogRecord *log_record, ArgumentType &&arg) noexcept + { +- return LogRecordSetterTrait<common::KeyValueIterable>::template Set( ++ return LogRecordSetterTrait<common::KeyValueIterable>::template Set<>( + log_record, std::forward<ArgumentType>(arg)); + } + |