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:
parent
22bc4b4271
commit
090a294017
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue