From 8e3eccaa14af94c412b32c9c2d62f924cc4b5f08 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sat, 27 Apr 2019 19:15:28 +0300 Subject: [PATCH] Do not include conversion.hpp from endian_load, endian_store.hpp --- include/boost/endian/conversion.hpp | 11 +----- include/boost/endian/detail/endian_load.hpp | 3 +- include/boost/endian/detail/endian_store.hpp | 5 ++- include/boost/endian/detail/order.hpp | 35 ++++++++++++++++++++ 4 files changed, 42 insertions(+), 12 deletions(-) create mode 100644 include/boost/endian/detail/order.hpp diff --git a/include/boost/endian/conversion.hpp b/include/boost/endian/conversion.hpp index 3792f0d..c975514 100644 --- a/include/boost/endian/conversion.hpp +++ b/include/boost/endian/conversion.hpp @@ -9,7 +9,7 @@ #define BOOST_ENDIAN_CONVERSION_HPP #include -#include +#include #include #include #include @@ -23,15 +23,6 @@ namespace boost { namespace endian { - BOOST_SCOPED_ENUM_START(order) - { - big, little, -# if BOOST_ENDIAN_BIG_BYTE - native = big -# else - native = little -# endif - }; BOOST_SCOPED_ENUM_END //--------------------------------------------------------------------------------------// // // diff --git a/include/boost/endian/detail/endian_load.hpp b/include/boost/endian/detail/endian_load.hpp index 8fac68a..589e623 100644 --- a/include/boost/endian/detail/endian_load.hpp +++ b/include/boost/endian/detail/endian_load.hpp @@ -6,9 +6,10 @@ // Distributed under the Boost Software License, Version 1.0. // http://www.boost.org/LICENSE_1_0.txt +#include +#include #include #include -#include #include #include #include diff --git a/include/boost/endian/detail/endian_store.hpp b/include/boost/endian/detail/endian_store.hpp index 03edbbe..5e758d1 100644 --- a/include/boost/endian/detail/endian_store.hpp +++ b/include/boost/endian/detail/endian_store.hpp @@ -6,9 +6,12 @@ // Distributed under the Boost Software License, Version 1.0. // http://www.boost.org/LICENSE_1_0.txt +#include +#include #include #include -#include +#include +#include #include #include #include diff --git a/include/boost/endian/detail/order.hpp b/include/boost/endian/detail/order.hpp new file mode 100644 index 0000000..786be4f --- /dev/null +++ b/include/boost/endian/detail/order.hpp @@ -0,0 +1,35 @@ +#ifndef BOOST_ENDIAN_DETAIL_ORDER_HPP_INCLUDED +#define BOOST_ENDIAN_DETAIL_ORDER_HPP_INCLUDED + +// Copyright 2019 Peter Dimov +// +// Distributed under the Boost Software License, Version 1.0. +// http://www.boost.org/LICENSE_1_0.txt + +#include +#include + +namespace boost +{ +namespace endian +{ + +BOOST_SCOPED_ENUM_START(order) +{ + big, little, + +# if BOOST_ENDIAN_BIG_BYTE + + native = big + +# else + + native = little + +# endif +}; BOOST_SCOPED_ENUM_END + +} // namespace endian +} // namespace boost + +#endif // BOOST_ENDIAN_DETAIL_ORDER_HPP_INCLUDED