endian: comment out signed byteswap

specifics of signed byteswap are unclear so we should remove it, but
it's not known exactly which projects rely on this functionality.
This commit is contained in:
Danny Robson 2014-12-30 18:35:11 +11:00
parent 6069edd0de
commit 0ea3d5b9ac

View File

@ -37,10 +37,10 @@ template <typename T>
constexpr T
bswap (T);
template <> constexpr int8_t bswap ( int8_t v) { return v; }
template <> constexpr int16_t bswap (int16_t v) { return __builtin_bswap16 (v); }
template <> constexpr int32_t bswap (int32_t v) { return __builtin_bswap32 (v); }
template <> constexpr int64_t bswap (int64_t v) { return __builtin_bswap64 (v); }
//template <> constexpr int8_t bswap ( int8_t v) { return v; }
//template <> constexpr int16_t bswap (int16_t v) { return __builtin_bswap16 (v); }
//template <> constexpr int32_t bswap (int32_t v) { return __builtin_bswap32 (v); }
//template <> constexpr int64_t bswap (int64_t v) { return __builtin_bswap64 (v); }
template <> constexpr uint8_t bswap ( uint8_t v) { return v; }
template <> constexpr uint16_t bswap (uint16_t v) { return __builtin_bswap16 (v); }