forked from boostorg/endian
Rename header converters.hpp back to conversion.hpp. Clean up infrastructure.
This commit is contained in:
1 parent
de91bcd571
commit
9089eb037b
10 files changed
+23
-17
No files matched your search
@@ -1,4 +1,4 @@
|
||||
// boost/endian/converters.hpp -------------------------------------------------------//
|
||||
// boost/endian/conversion.hpp -------------------------------------------------------//
|
||||
|
||||
// Copyright Beman Dawes 2010, 2011
|
||||
|
||||
@@ -47,17 +47,6 @@ namespace endian
|
||||
inline float reverse_value(float x) BOOST_NOEXCEPT;
|
||||
inline double reverse_value(double x) BOOST_NOEXCEPT;
|
||||
|
||||
namespace detail
|
||||
// This function is unsafe for general use, so is placed in namespace detail.
|
||||
// Think of what happens if you reverse_value a std::pair<int16_t, int_16_t>; the bytes
|
||||
// from first end up in second and the bytes from second end up in first. Not good!
|
||||
{
|
||||
// general reverse_value function template to meet requests for UDT support by Vicente
|
||||
// Botet and others.
|
||||
template <class T>
|
||||
inline T reverse_value(T x) BOOST_NOEXCEPT; // convert little to big or visa versa
|
||||
}
|
||||
|
||||
// reverse bytes unless native endianness is big
|
||||
// possible names: reverse_unless_native_big, reverse_value_unless_big, reverse_unless_big
|
||||
template <class ReversibleValue >
|
||||
@@ -136,6 +125,16 @@ namespace endian
|
||||
|
||||
//----------------------------------- end synopsis -------------------------------------//
|
||||
|
||||
namespace detail
|
||||
// This function is unsafe for general use, so is placed in namespace detail.
|
||||
// Think of what happens if you reverse_value a std::pair<int16_t, int_16_t>; the bytes
|
||||
// from first end up in second and the bytes from second end up in first. Not good!
|
||||
{
|
||||
// general reverse_value function template useful in testing
|
||||
template <class T>
|
||||
inline T reverse_value(T x) BOOST_NOEXCEPT; // convert little to big or visa versa
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------//
|
||||
// //
|
||||
// implementation //
|
||||
@@ -10,7 +10,7 @@
|
||||
#ifndef BOOST_ENDIAN_STD_PAIR_HPP
|
||||
#define BOOST_ENDIAN_STD_PAIR_HPP
|
||||
|
||||
#include <boost/endian/converters.hpp>
|
||||
#include <boost/endian/conversion.hpp>
|
||||
#include <utility>
|
||||
|
||||
namespace boost
|
||||
|
||||
Reference in new issue
Block a user