From 011bbbadc9388105e44524d59b7468ecf6c863a9 Mon Sep 17 00:00:00 2001 From: Czarek Nakamoto Date: Thu, 20 Feb 2025 08:36:28 +0100 Subject: [PATCH 15/22] remove trivially_copyable assert --- contrib/epee/include/span.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/epee/include/span.h b/contrib/epee/include/span.h index ccc55db53..2774881a1 100644 --- a/contrib/epee/include/span.h +++ b/contrib/epee/include/span.h @@ -159,7 +159,7 @@ namespace epee { static_assert(!std::is_empty(), "empty types will not work -> sizeof == 1"); static_assert(std::is_standard_layout_v, "type must have standard layout"); - static_assert(std::has_unique_object_representations_v, "type must be trivially copyable with no padding"); + static_assert(alignof(T) == 1, "type may have padding"); return {reinterpret_cast(std::addressof(src)), sizeof(T)}; } @@ -169,7 +169,7 @@ namespace epee { static_assert(!std::is_empty(), "empty types will not work -> sizeof == 1"); static_assert(std::is_standard_layout_v, "type must have standard layout"); - static_assert(std::has_unique_object_representations_v, "type must be trivially copyable with no padding"); + static_assert(alignof(T) == 1, "type may have padding"); return {reinterpret_cast(std::addressof(src)), sizeof(T)}; } -- 2.54.0 (Apple Git-157)