BAN: Add {little,big}_endian_to_host

These just call host_to_{little,big}_endian but are more verbose
and cleaner.
This commit is contained in:
Bananymous 2024-04-09 01:13:28 +03:00
parent 22bc4b4271
commit 090a294017
1 changed files with 12 additions and 0 deletions

View File

@ -45,6 +45,12 @@ namespace BAN
#endif
}
template<integral T>
constexpr T little_endian_to_host(T value)
{
return host_to_little_endian(value);
}
template<integral T>
constexpr T host_to_big_endian(T value)
{
@ -55,6 +61,12 @@ namespace BAN
#endif
}
template<integral T>
constexpr T big_endian_to_host(T value)
{
return host_to_big_endian(value);
}
template<integral T>
struct LittleEndian
{