|
@@ -51,11 +51,11 @@ class basic_any {
|
|
|
|
|
|
|
|
struct storage_type {
|
|
struct storage_type {
|
|
|
// NOLINTNEXTLINE(cppcoreguidelines-avoid-c-arrays, modernize-avoid-c-arrays)
|
|
// NOLINTNEXTLINE(cppcoreguidelines-avoid-c-arrays, modernize-avoid-c-arrays)
|
|
|
- alignas(Align) std::byte data[Len + !Len];
|
|
|
|
|
|
|
+ alignas(Align) std::byte data[Len + static_cast<std::size_t>(Len == 0u)];
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
template<typename Type>
|
|
template<typename Type>
|
|
|
- static constexpr bool in_situ = Len && alignof(Type) <= Align && sizeof(Type) <= Len && std::is_nothrow_move_constructible_v<Type>;
|
|
|
|
|
|
|
+ static constexpr bool in_situ = (Len != 0u) && alignof(Type) <= Align && sizeof(Type) <= Len && std::is_nothrow_move_constructible_v<Type>;
|
|
|
|
|
|
|
|
template<typename Type>
|
|
template<typename Type>
|
|
|
static const void *basic_vtable(const operation op, const basic_any &value, const void *other) {
|
|
static const void *basic_vtable(const operation op, const basic_any &value, const void *other) {
|