diff --git a/cast.hpp b/cast.hpp index 4ac27666..30df1c8c 100644 --- a/cast.hpp +++ b/cast.hpp @@ -171,6 +171,18 @@ namespace util::cast { return reinterpret_cast (src); #pragma GCC diagnostic pop } -}; + + + /////////////////////////////////////////////////////////////////////////// + /// cast from SrcT to DstT and damn any consequences. + template + DstT ffs (SrcT src) + { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wcast-align" + return reinterpret_cast (src); +#pragma GCC diagnostic pop + } +} #endif