X-Git-Url: http://xvm.mit.edu/gitweb/invirt/third/libt4.git/blobdiff_plain/eb3d5c6416c0f0d1cad35e52af3231de7866fea8..26ade07ab0e62b98b452fbbd18edba0450035e35:/endian.h diff --git a/endian.h b/endian.h index 7385406..f34d371 100644 --- a/endian.h +++ b/endian.h @@ -27,15 +27,15 @@ tuple_hton_imp(tuple && t, tuple_indices) { template inline tuple::type...> hton(tuple && t) { - using Indices = typename make_tuple_indices::type; - return tuple_hton_imp(forward>(t), Indices()); + return tuple_hton_imp(forward>(t), TUPLE_INDICES(Args)); } -#define ENDIAN_SWAPPABLE(_c_) \ -inline _c_ hton(_c_ && t) { \ - _c_ result; \ - result._tuple_() = hton(t._tuple_()); \ - return result; \ +template inline typename +enable_if::value, T>::type +hton(T && t) { + T result; + result._tuple_() = hton(t._tuple_()); + return result; } #endif