Function c2k::to_network_byte_order
Defined in File byte_order.hpp
Function Documentation
-
constexpr auto c2k::to_network_byte_order(std::integral auto const value)
Converts a value to network byte order.
This function converts the given value to network byte order if the native byte order is different from network byte order. Otherwise, it returns the value as is.
- Template Parameters:
T – The integral type of the value.
- Parameters:
value – The value to convert.
- Returns:
The converted value in network byte order.