Browse Source

any: clang-tidy docet

skypjack 5 months ago
parent
commit
47c65a20a1
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/entt/core/any.hpp

+ 2 - 0
src/entt/core/any.hpp

@@ -30,6 +30,7 @@ template<std::size_t Len, std::size_t Align>
 struct basic_any_storage {
     union {
         const void *instance{};
+        // NOLINTNEXTLINE(cppcoreguidelines-avoid-c-arrays, modernize-avoid-c-arrays)
         alignas(Align) std::byte buffer[Len];
     };
 };
@@ -40,6 +41,7 @@ struct basic_any_storage<0u, Align> {
 };
 
 template<typename Type, std::size_t Len, std::size_t Align>
+// NOLINTNEXTLINE(bugprone-sizeof-expression)
 struct in_situ: std::bool_constant<(Len != 0u) && alignof(Type) <= Align && sizeof(Type) <= Len && std::is_nothrow_move_constructible_v<Type>> {};
 
 template<std::size_t Len, std::size_t Align>