From a7475d0f63be9fcd721f56eb262ef64b94aab304 Mon Sep 17 00:00:00 2001 From: Beman Date: Sun, 12 May 2013 14:28:20 -0400 Subject: [PATCH] Really fix the bug this time. Add TODO list. --- include/boost/endian/converters.hpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/include/boost/endian/converters.hpp b/include/boost/endian/converters.hpp index 38f597d..638c253 100644 --- a/include/boost/endian/converters.hpp +++ b/include/boost/endian/converters.hpp @@ -16,6 +16,16 @@ #include #include +/* + + TODO: + + * Reversible means reverse_value(x) well-formed in some places, reverse(x) well-formed + in other places. + * Inplace converts should should be implemented in terms of reverse(), not convert_value() + +*/ + //------------------------------------- synopsis ---------------------------------------// namespace boost @@ -383,6 +393,7 @@ namespace endian // reverse unless native endianness is big template inline void big_endian(Reversible& x) BOOST_NOEXCEPT + // Effects: none if native endian order is big, otherwise reverse(x) { # ifndef BOOST_BIG_ENDIAN reverse(x); @@ -395,7 +406,7 @@ namespace endian // Effects: none if native endian order is little, otherwise reverse(x) { # ifndef BOOST_LITTLE_ENDIAN - x = reverse_value(x); + x = reverse(x); # endif }