mirror of
https://github.com/boostorg/endian.git
synced 2025-08-03 14:34:33 +02:00
Rename header converters.hpp back to conversion.hpp. Clean up infrastructure.
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
|
||||
#include <boost/endian/detail/disable_warnings.hpp>
|
||||
|
||||
#include <boost/endian/converters.hpp>
|
||||
#include <boost/endian/conversion.hpp>
|
||||
#include <iostream>
|
||||
#include <cstring>
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -8,7 +8,7 @@
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
|
||||
#include <cstdlib>
|
||||
#include <boost/endian/converters.hpp>
|
||||
#include <boost/endian/conversion.hpp>
|
||||
#include <boost/random.hpp>
|
||||
#include <boost/cstdint.hpp>
|
||||
#include <boost/timer/timer.hpp>
|
||||
|
@@ -9,7 +9,7 @@
|
||||
|
||||
#include <boost/endian/detail/disable_warnings.hpp>
|
||||
|
||||
#include <boost/endian/converters.hpp>
|
||||
#include <boost/endian/conversion.hpp>
|
||||
#include <boost/detail/lightweight_main.hpp>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
#include <iostream>
|
||||
|
@@ -58,6 +58,7 @@
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -75,6 +76,7 @@
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
|
@@ -61,6 +61,7 @@
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -78,6 +79,7 @@
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
|
@@ -66,6 +66,7 @@
|
||||
</PrecompiledHeader>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4552;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -84,6 +85,7 @@
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
|
@@ -80,6 +80,7 @@
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
|
@@ -11,7 +11,7 @@
|
||||
|
||||
#include <boost/endian/detail/disable_warnings.hpp>
|
||||
|
||||
#include <boost/endian/converters.hpp>
|
||||
#include <boost/endian/conversion.hpp>
|
||||
#include <boost/endian/integers.hpp>
|
||||
#include <boost/cstdint.hpp>
|
||||
#include <boost/timer/timer.hpp>
|
||||
|
Reference in New Issue
Block a user