Rename header converters.hpp back to conversion.hpp. Clean up infrastructure.

This commit is contained in:
Beman
2013-05-18 16:14:30 -04:00
parent de91bcd571
commit 9089eb037b
10 changed files with 23 additions and 17 deletions

View File

@@ -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>

View File

@@ -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 //

View File

@@ -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

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -80,6 +80,7 @@
<PrecompiledHeader>
</PrecompiledHeader>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<WarningLevel>Level3</WarningLevel>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>

View File

@@ -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>