mirror of
https://github.com/boostorg/endian.git
synced 2025-08-02 14:04:29 +02:00
Really fix the bug this time. Add TODO list.
This commit is contained in:
@@ -16,6 +16,16 @@
|
|||||||
#include <boost/static_assert.hpp>
|
#include <boost/static_assert.hpp>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
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 ---------------------------------------//
|
//------------------------------------- synopsis ---------------------------------------//
|
||||||
|
|
||||||
namespace boost
|
namespace boost
|
||||||
@@ -383,6 +393,7 @@ namespace endian
|
|||||||
// reverse unless native endianness is big
|
// reverse unless native endianness is big
|
||||||
template <class Reversible>
|
template <class Reversible>
|
||||||
inline void big_endian(Reversible& x) BOOST_NOEXCEPT
|
inline void big_endian(Reversible& x) BOOST_NOEXCEPT
|
||||||
|
// Effects: none if native endian order is big, otherwise reverse(x)
|
||||||
{
|
{
|
||||||
# ifndef BOOST_BIG_ENDIAN
|
# ifndef BOOST_BIG_ENDIAN
|
||||||
reverse(x);
|
reverse(x);
|
||||||
@@ -395,7 +406,7 @@ namespace endian
|
|||||||
// Effects: none if native endian order is little, otherwise reverse(x)
|
// Effects: none if native endian order is little, otherwise reverse(x)
|
||||||
{
|
{
|
||||||
# ifndef BOOST_LITTLE_ENDIAN
|
# ifndef BOOST_LITTLE_ENDIAN
|
||||||
x = reverse_value(x);
|
x = reverse(x);
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user