Skip to content

Commit

Permalink
fix universal: hint to use formats/serialize/boost_uuid.hpp
Browse files Browse the repository at this point in the history
commit_hash:9562ce349ff7355b607e6ab325f66e6e93667f8d
ArkadyRudenko committed Jan 31, 2025
1 parent b71e4d6 commit b8361d8
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -14,6 +14,10 @@

#include <userver/formats/common/meta.hpp>

namespace boost::uuids {
struct uuid;
}

USERVER_NAMESPACE_BEGIN

namespace utils::impl::strong_typedef {
@@ -85,6 +89,10 @@ WriteToStream(const T& value, StringBuilder& sw) {
if constexpr (meta::kIsMap<T>) {
impl::WriteToStreamDict(value, sw);
} else if constexpr (meta::kIsRange<T>) {
static_assert(
!std::is_same_v<T, boost::uuids::uuid>,
"Include <userver/formats/serialize/boost_uuid.hpp> to serialize 'boost::uuids::uuid"
);
static_assert(
!meta::kIsRecursiveRange<T>,
"Trying to log a recursive range, which can be dangerous. "

0 comments on commit b8361d8

Please sign in to comment.