BAN: Implement bit_cast

This commit is contained in:
Bananymous 2024-02-12 21:46:33 +02:00
parent 3fc1edede0
commit 78ef7e804f
1 changed files with 12 additions and 0 deletions

12
BAN/include/BAN/Bitcast.h Normal file
View File

@ -0,0 +1,12 @@
#pragma once
namespace BAN
{
template<typename To, typename From>
constexpr To bit_cast(const From& from)
{
return __builtin_bit_cast(To, from);
}
}