Skip to content

Commit

Permalink
Fix compilation on aarch32 with GCC
Browse files Browse the repository at this point in the history
std::size_t and unsigned long are distinct types there
  • Loading branch information
pavel-kirienko authored Jun 30, 2024
1 parent a1ba925 commit dea6073
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/cetl/unbounded_variant.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ struct base_storage<void /*Pmr*/, Footprint, Alignment>
// NB! It's intentional and by design that the `inplace_buffer_` is the very first member of `unbounded_variant`
// memory layout. In such way pointer to a `unbounded_variant` and its stored value are the same -
// could be useful during debugging/troubleshooting.
alignas(Alignment) std::uint8_t inplace_buffer_[std::max(Footprint, 1UL)];
alignas(Alignment) std::uint8_t inplace_buffer_[std::max<std::size_t>(Footprint, 1UL)];

// Stores the size of the allocated space in the buffer for a value.
// The size could be less than `Footprint`, but never zero except when variant is empty (valid and valueless).
Expand Down

0 comments on commit dea6073

Please sign in to comment.