Function c2k::from_network_byte_order

Function Documentation

constexpr auto c2k::from_network_byte_order(std::integral auto const value)

Converts a value from network byte order to native byte order.

This function converts the given value from network byte order to native 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.