cast: test the correct type for alignment
This commit is contained in:
parent
0eb7fdf5cd
commit
1567c4f9cc
2
cast.hpp
2
cast.hpp
@ -167,7 +167,7 @@ namespace util::cast {
|
||||
{
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wcast-align"
|
||||
CHECK_MOD (reinterpret_cast<uintptr_t> (src), alignof (DstT));
|
||||
CHECK_MOD (reinterpret_cast<uintptr_t> (src), alignof (std::remove_pointer_t<DstT>));
|
||||
return reinterpret_cast<DstT> (src);
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user