mirror of
https://github.com/boostorg/endian.git
synced 2025-08-04 06:54:32 +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/detail/disable_warnings.hpp>
|
||||||
|
|
||||||
#include <boost/endian/converters.hpp>
|
#include <boost/endian/conversion.hpp>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
// boost/endian/converters.hpp -------------------------------------------------------//
|
// boost/endian/conversion.hpp -------------------------------------------------------//
|
||||||
|
|
||||||
// Copyright Beman Dawes 2010, 2011
|
// Copyright Beman Dawes 2010, 2011
|
||||||
|
|
||||||
@@ -47,17 +47,6 @@ namespace endian
|
|||||||
inline float reverse_value(float x) BOOST_NOEXCEPT;
|
inline float reverse_value(float x) BOOST_NOEXCEPT;
|
||||||
inline double reverse_value(double 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
|
// reverse bytes unless native endianness is big
|
||||||
// possible names: reverse_unless_native_big, reverse_value_unless_big, reverse_unless_big
|
// possible names: reverse_unless_native_big, reverse_value_unless_big, reverse_unless_big
|
||||||
template <class ReversibleValue >
|
template <class ReversibleValue >
|
||||||
@@ -136,6 +125,16 @@ namespace endian
|
|||||||
|
|
||||||
//----------------------------------- end synopsis -------------------------------------//
|
//----------------------------------- 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 //
|
// implementation //
|
@@ -10,7 +10,7 @@
|
|||||||
#ifndef BOOST_ENDIAN_STD_PAIR_HPP
|
#ifndef BOOST_ENDIAN_STD_PAIR_HPP
|
||||||
#define BOOST_ENDIAN_STD_PAIR_HPP
|
#define BOOST_ENDIAN_STD_PAIR_HPP
|
||||||
|
|
||||||
#include <boost/endian/converters.hpp>
|
#include <boost/endian/conversion.hpp>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
namespace boost
|
namespace boost
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
#define _CRT_SECURE_NO_WARNINGS
|
#define _CRT_SECURE_NO_WARNINGS
|
||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <boost/endian/converters.hpp>
|
#include <boost/endian/conversion.hpp>
|
||||||
#include <boost/random.hpp>
|
#include <boost/random.hpp>
|
||||||
#include <boost/cstdint.hpp>
|
#include <boost/cstdint.hpp>
|
||||||
#include <boost/timer/timer.hpp>
|
#include <boost/timer/timer.hpp>
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
#include <boost/endian/detail/disable_warnings.hpp>
|
#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_main.hpp>
|
||||||
#include <boost/detail/lightweight_test.hpp>
|
#include <boost/detail/lightweight_test.hpp>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
@@ -58,6 +58,7 @@
|
|||||||
<PrecompiledHeader>
|
<PrecompiledHeader>
|
||||||
</PrecompiledHeader>
|
</PrecompiledHeader>
|
||||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
@@ -75,6 +76,7 @@
|
|||||||
<PrecompiledHeader>
|
<PrecompiledHeader>
|
||||||
</PrecompiledHeader>
|
</PrecompiledHeader>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
@@ -61,6 +61,7 @@
|
|||||||
<PrecompiledHeader>
|
<PrecompiledHeader>
|
||||||
</PrecompiledHeader>
|
</PrecompiledHeader>
|
||||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
@@ -78,6 +79,7 @@
|
|||||||
<PrecompiledHeader>
|
<PrecompiledHeader>
|
||||||
</PrecompiledHeader>
|
</PrecompiledHeader>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
@@ -66,6 +66,7 @@
|
|||||||
</PrecompiledHeader>
|
</PrecompiledHeader>
|
||||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||||
<DisableSpecificWarnings>4552;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
<DisableSpecificWarnings>4552;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
@@ -84,6 +85,7 @@
|
|||||||
<PrecompiledHeader>
|
<PrecompiledHeader>
|
||||||
</PrecompiledHeader>
|
</PrecompiledHeader>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
@@ -80,6 +80,7 @@
|
|||||||
<PrecompiledHeader>
|
<PrecompiledHeader>
|
||||||
</PrecompiledHeader>
|
</PrecompiledHeader>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include <boost/endian/detail/disable_warnings.hpp>
|
#include <boost/endian/detail/disable_warnings.hpp>
|
||||||
|
|
||||||
#include <boost/endian/converters.hpp>
|
#include <boost/endian/conversion.hpp>
|
||||||
#include <boost/endian/integers.hpp>
|
#include <boost/endian/integers.hpp>
|
||||||
#include <boost/cstdint.hpp>
|
#include <boost/cstdint.hpp>
|
||||||
#include <boost/timer/timer.hpp>
|
#include <boost/timer/timer.hpp>
|
||||||
|
Reference in New Issue
Block a user