From ffec3875be84b83dba638d7be2119df6559c6610 Mon Sep 17 00:00:00 2001 From: bemandawes Date: Sun, 4 Sep 2011 17:34:53 +0000 Subject: [PATCH] Remove tests and examples not part of proposed library. Also turn off mistaken MSVC warnings. git-svn-id: http://svn.boost.org/svn/boost/sandbox/endian@74226 b8fc166d-592f-0410-95f2-cb63ce0dd405 --- boost/endian/detail/cover_operators.hpp | 9 ++ boost/endian/integers.hpp | 9 ++ libs/endian/example/endian_hello_world.cpp | 39 -------- .../binary_stream_example.vcxproj | 85 ----------------- .../binary_stream_test.vcxproj | 93 ------------------- libs/endian/test/msvc10/endian.sln | 18 ---- .../endian_hello_world.vcxproj | 93 ------------------- 7 files changed, 18 insertions(+), 328 deletions(-) delete mode 100644 libs/endian/example/endian_hello_world.cpp delete mode 100644 libs/endian/test/msvc10/binary_stream_example/binary_stream_example.vcxproj delete mode 100644 libs/endian/test/msvc10/binary_stream_test/binary_stream_test.vcxproj delete mode 100644 libs/endian/test/msvc10/endian_hello_world/endian_hello_world.vcxproj diff --git a/boost/endian/detail/cover_operators.hpp b/boost/endian/detail/cover_operators.hpp index 9d0b2f8..6aa8c51 100644 --- a/boost/endian/detail/cover_operators.hpp +++ b/boost/endian/detail/cover_operators.hpp @@ -19,6 +19,11 @@ #ifndef BOOST_INTEGER_COVER_OPERATORS_HPP #define BOOST_INTEGER_COVER_OPERATORS_HPP +#if defined(_MSC_VER) +# pragma warning(push) +# pragma warning(disable:4365) // conversion ... signed/unsigned mismatch +#endif + # ifndef BOOST_MINIMAL_INTEGER_COVER_OPERATORS # include # endif @@ -108,4 +113,8 @@ namespace boost } // namespace endian } // namespace boost +#if defined(_MSC_VER) +# pragma warning(pop) +#endif + #endif // BOOST_INTEGER_COVER_OPERATORS_HPP diff --git a/boost/endian/integers.hpp b/boost/endian/integers.hpp index b4926b5..52cfbeb 100644 --- a/boost/endian/integers.hpp +++ b/boost/endian/integers.hpp @@ -21,6 +21,11 @@ #ifndef BOOST_ENDIAN_HPP #define BOOST_ENDIAN_HPP +#if defined(_MSC_VER) +# pragma warning(push) +# pragma warning(disable:4365) // conversion ... signed/unsigned mismatch +#endif + #ifdef BOOST_ENDIAN_LOG # include #endif @@ -428,4 +433,8 @@ namespace boost # pragma pack(pop) #endif +#if defined(_MSC_VER) +# pragma warning(pop) +#endif + #endif // BOOST_ENDIAN_HPP diff --git a/libs/endian/example/endian_hello_world.cpp b/libs/endian/example/endian_hello_world.cpp deleted file mode 100644 index b065068..0000000 --- a/libs/endian/example/endian_hello_world.cpp +++ /dev/null @@ -1,39 +0,0 @@ -// endian_io_test.cpp ----------------------------------------------------------------// - -// Copyright Beman Dawes, 2009 - -// Distributed under the Boost Software License, Version 1.0. -// See http://www.boost.org/LICENSE_1_0.txt - -// See library home page at http://www.boost.org/libs/endian - -#include - -#include -#include -#include - -using namespace boost; -using namespace boost::endian; - -int main() -{ - int_least32_t v = 0x31323334L; // = ASCII { '1', '2', '3', '4' } - // value chosen to work on text stream - big32_t b(v); - little32_t l(v); - - std::cout << std::hex << "Hello, endian world!\n\n"; - - std::cout << "hex stream output: int_least32_t=" << v - << ", big32_t=" << b << ", little32_t=" << l << '\n'; - std::cout << "bin stream output: int_least32_t=" << bin(v) - << ", big32_t=" << bin(b) << ", little32_t=" << bin(l) << '\n'; -} - -// Output on a little endian machine: -// -// Hello, endian world! -// -// hex stream output: int_least32_t=31323334, big32_t=31323334, little32_t=31323334 -// bin stream output: int_least32_t=4321, big32_t=1234, little32_t=4321 diff --git a/libs/endian/test/msvc10/binary_stream_example/binary_stream_example.vcxproj b/libs/endian/test/msvc10/binary_stream_example/binary_stream_example.vcxproj deleted file mode 100644 index 769e0ae..0000000 --- a/libs/endian/test/msvc10/binary_stream_example/binary_stream_example.vcxproj +++ /dev/null @@ -1,85 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - - - - {06736C67-6305-4A9F-8D10-850FD0CE907D} - Win32Proj - binary_stream_example - bin_manip_example - - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - true - - - false - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - - - Console - true - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - - - Console - true - true - true - - - - - - \ No newline at end of file diff --git a/libs/endian/test/msvc10/binary_stream_test/binary_stream_test.vcxproj b/libs/endian/test/msvc10/binary_stream_test/binary_stream_test.vcxproj deleted file mode 100644 index f4fca44..0000000 --- a/libs/endian/test/msvc10/binary_stream_test/binary_stream_test.vcxproj +++ /dev/null @@ -1,93 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - - - - {1382D085-FF3F-4573-8709-E10D3D74D620} - binary_stream_test - Win32Proj - - - - Application - Unicode - true - - - Application - Unicode - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - true - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - - - - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - EditAndContinue - - - true - Console - MachineX86 - - - - - MaxSpeed - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - MultiThreadedDLL - true - - - Level3 - ProgramDatabase - - - true - Console - true - true - MachineX86 - - - - - - \ No newline at end of file diff --git a/libs/endian/test/msvc10/endian.sln b/libs/endian/test/msvc10/endian.sln index 1ac82d4..a519a12 100644 --- a/libs/endian/test/msvc10/endian.sln +++ b/libs/endian/test/msvc10/endian.sln @@ -11,12 +11,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scoped_enum_emulation_test" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "endian_example", "endian_example\endian_example.vcxproj", "{8638A3D8-D121-40BF-82E5-127F1B1B2CB2}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "endian_hello_world", "endian_hello_world\endian_hello_world.vcxproj", "{1AAEBB4E-501E-417E-9531-04469AF5DD8B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "binary_stream_test", "binary_stream_test\binary_stream_test.vcxproj", "{1382D085-FF3F-4573-8709-E10D3D74D620}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bin_manip_example", "binary_stream_example\binary_stream_example.vcxproj", "{06736C67-6305-4A9F-8D10-850FD0CE907D}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "conversion_test", "conversion_test\conversion_test.vcxproj", "{9FA33B0B-2B00-49E8-A892-E049D86076A9}" EndProject Global @@ -45,18 +39,6 @@ Global {8638A3D8-D121-40BF-82E5-127F1B1B2CB2}.Debug|Win32.Build.0 = Debug|Win32 {8638A3D8-D121-40BF-82E5-127F1B1B2CB2}.Release|Win32.ActiveCfg = Release|Win32 {8638A3D8-D121-40BF-82E5-127F1B1B2CB2}.Release|Win32.Build.0 = Release|Win32 - {1AAEBB4E-501E-417E-9531-04469AF5DD8B}.Debug|Win32.ActiveCfg = Debug|Win32 - {1AAEBB4E-501E-417E-9531-04469AF5DD8B}.Debug|Win32.Build.0 = Debug|Win32 - {1AAEBB4E-501E-417E-9531-04469AF5DD8B}.Release|Win32.ActiveCfg = Release|Win32 - {1AAEBB4E-501E-417E-9531-04469AF5DD8B}.Release|Win32.Build.0 = Release|Win32 - {1382D085-FF3F-4573-8709-E10D3D74D620}.Debug|Win32.ActiveCfg = Debug|Win32 - {1382D085-FF3F-4573-8709-E10D3D74D620}.Debug|Win32.Build.0 = Debug|Win32 - {1382D085-FF3F-4573-8709-E10D3D74D620}.Release|Win32.ActiveCfg = Release|Win32 - {1382D085-FF3F-4573-8709-E10D3D74D620}.Release|Win32.Build.0 = Release|Win32 - {06736C67-6305-4A9F-8D10-850FD0CE907D}.Debug|Win32.ActiveCfg = Debug|Win32 - {06736C67-6305-4A9F-8D10-850FD0CE907D}.Debug|Win32.Build.0 = Debug|Win32 - {06736C67-6305-4A9F-8D10-850FD0CE907D}.Release|Win32.ActiveCfg = Release|Win32 - {06736C67-6305-4A9F-8D10-850FD0CE907D}.Release|Win32.Build.0 = Release|Win32 {9FA33B0B-2B00-49E8-A892-E049D86076A9}.Debug|Win32.ActiveCfg = Debug|Win32 {9FA33B0B-2B00-49E8-A892-E049D86076A9}.Debug|Win32.Build.0 = Debug|Win32 {9FA33B0B-2B00-49E8-A892-E049D86076A9}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/libs/endian/test/msvc10/endian_hello_world/endian_hello_world.vcxproj b/libs/endian/test/msvc10/endian_hello_world/endian_hello_world.vcxproj deleted file mode 100644 index 45e3a72..0000000 --- a/libs/endian/test/msvc10/endian_hello_world/endian_hello_world.vcxproj +++ /dev/null @@ -1,93 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - {1AAEBB4E-501E-417E-9531-04469AF5DD8B} - endian_hello_world - Win32Proj - - - - Application - Unicode - true - - - Application - Unicode - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - true - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - - - - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - EnableAllWarnings - EditAndContinue - - - true - Console - MachineX86 - - - - - MaxSpeed - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - MultiThreadedDLL - true - - - EnableAllWarnings - ProgramDatabase - - - true - Console - true - true - MachineX86 - - - - - - - - - \ No newline at end of file