atomic_t: cleanup type requirements

Add C++17 requirements.
Remove alignment requirements (auto-align type).
What's missing is to detect padding and forbid it.
This commit is contained in:
Nekotekina 2020-12-04 18:03:50 +03:00
parent 8efc22bd45
commit d1e7837422
6 changed files with 38 additions and 20 deletions

View file

@ -539,6 +539,12 @@ struct alignas(16) s128
CHECK_SIZE_ALIGN(u128, 16, 16);
CHECK_SIZE_ALIGN(s128, 16, 16);
template <>
struct get_int_impl<16>
{
using utype = u128;
};
// Return magic value for any unsigned type
constexpr inline struct umax_helper
{