M5Utility 0.0.7 git rev:ba71c71
Loading...
Searching...
No Matches
byteswap.hpp File Reference

std::byteswap for less than C++23 More...

#include <stdint.h>
#include <type_traits>
#include <cstring>

Go to the source code of this file.

Namespaces

namespace  m5
 Top level namespace of M5.
 

Functions

template<typename T , typename std::enable_if<(std::is_integral< T >::value||std::is_enum< T >::value), std::nullptr_t >::type = nullptr>
constexpr T m5::stl::byteswap (T v) noexcept
 byteswap for integral type
 
template<typename T , typename std::enable_if<!(std::is_integral< T >::value||std::is_enum< T >::value), std::nullptr_t >::type = nullptr>
m5::stl::byteswap (T)=delete
 byteswap for integral type
 

Detailed Description

std::byteswap for less than C++23