Skip to content

Commit

Permalink
Merge branch 'main' into fix_default_proto_version_in_cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
marcalff authored May 28, 2024
2 parents 627e3e4 + 17c3bc6 commit 4d6b314
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions api/include/opentelemetry/logs/logger_type_traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#pragma once

#include <chrono>
#include <memory>
#include <type_traits>

#include "opentelemetry/common/attribute_value.h"
Expand Down Expand Up @@ -145,6 +146,10 @@ struct LogRecordSetterTrait<common::KeyValueIterable>
template <class ValueType>
struct LogRecordSetterTrait
{
static_assert(!std::is_same<nostd::unique_ptr<LogRecord>, ValueType>::value &&
!std::is_same<std::unique_ptr<LogRecord>, ValueType>::value,
"unique_ptr<LogRecord> is not allowed, please use std::move()");

template <class ArgumentType,
nostd::enable_if_t<std::is_convertible<ArgumentType, nostd::string_view>::value ||
std::is_convertible<ArgumentType, common::AttributeValue>::value,
Expand Down

0 comments on commit 4d6b314

Please sign in to comment.