From 36e0b187c0123ee292167282543084a996ed668b Mon Sep 17 00:00:00 2001 From: bolero-MURAKAMI Date: Fri, 8 Apr 2016 12:51:11 +0900 Subject: [PATCH] change hash adapt --- sprout/adapt/boost/array.hpp | 17 ++ sprout/container/boost/array.hpp | 63 +++++++ sprout/functional/hash/boost/array.hpp | 31 ++++ sprout/functional/hash/hash_value.hpp | 147 +++++++++++++++- sprout/functional/hash/hash_value_traits.hpp | 163 ++---------------- sprout/functional/hash/to_hash.hpp | 21 +-- sprout/tuple/boost/array.hpp | 48 ++++++ .../type_traits/has_arithmetic_operator.hpp | 22 +++ .../type_traits/has_assignment_operator.hpp | 26 +++ sprout/type_traits/has_bitwise_operator.hpp | 22 +++ .../type_traits/has_comparison_operator.hpp | 19 ++ sprout/type_traits/has_inc_dec_operator.hpp | 17 ++ sprout/type_traits/has_logical_operator.hpp | 16 ++ sprout/type_traits/has_members_operator.hpp | 15 ++ sprout/type_traits/has_operator.hpp | 68 +------- sprout/type_traits/has_reference_operator.hpp | 15 ++ sprout/type_traits/has_various_operator.hpp | 15 ++ 17 files changed, 505 insertions(+), 220 deletions(-) create mode 100644 sprout/adapt/boost/array.hpp create mode 100644 sprout/container/boost/array.hpp create mode 100644 sprout/functional/hash/boost/array.hpp create mode 100644 sprout/tuple/boost/array.hpp create mode 100644 sprout/type_traits/has_arithmetic_operator.hpp create mode 100644 sprout/type_traits/has_assignment_operator.hpp create mode 100644 sprout/type_traits/has_bitwise_operator.hpp create mode 100644 sprout/type_traits/has_comparison_operator.hpp create mode 100644 sprout/type_traits/has_inc_dec_operator.hpp create mode 100644 sprout/type_traits/has_logical_operator.hpp create mode 100644 sprout/type_traits/has_members_operator.hpp create mode 100644 sprout/type_traits/has_reference_operator.hpp create mode 100644 sprout/type_traits/has_various_operator.hpp diff --git a/sprout/adapt/boost/array.hpp b/sprout/adapt/boost/array.hpp new file mode 100644 index 00000000..7b08fed3 --- /dev/null +++ b/sprout/adapt/boost/array.hpp @@ -0,0 +1,17 @@ +/*============================================================================= + Copyright (c) 2011-2016 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_ADAPT_BOOST_ARRAY_HPP +#define SPROUT_ADAPT_BOOST_ARRAY_HPP + +#include +#include +#include +#include +#include + +#endif // #ifndef SPROUT_ADAPT_BOOST_ARRAY_HPP diff --git a/sprout/container/boost/array.hpp b/sprout/container/boost/array.hpp new file mode 100644 index 00000000..8d7ea509 --- /dev/null +++ b/sprout/container/boost/array.hpp @@ -0,0 +1,63 @@ +/*============================================================================= + Copyright (c) 2011-2016 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_CONTAINER_BOOST_ARRAY_HPP +#define SPROUT_CONTAINER_BOOST_ARRAY_HPP + +#include +#include +#if SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION +# include +# include +# include +# include +#endif + +#if SPROUT_USE_INDEX_ITERATOR_IMPLEMENTATION +namespace sprout { + // + // container_traits + // + template + struct container_traits > + : public sprout::detail::container_traits_default > + { + public: + typedef sprout::index_iterator&, true> iterator; + typedef sprout::index_iterator const&, true> const_iterator; + }; + + // + // container_range_traits + // + template + struct container_range_traits > + : public sprout::detail::container_range_traits_default > + { + public: + static SPROUT_CONSTEXPR typename sprout::container_traits >::iterator + range_begin(boost::array& cont) { + return typename sprout::container_traits >::iterator(cont, 0); + } + static SPROUT_CONSTEXPR typename sprout::container_traits const>::iterator + range_begin(boost::array const& cont) { + return typename sprout::container_traits const>::iterator(cont, 0); + } + + static SPROUT_CONSTEXPR typename sprout::container_traits >::iterator + range_end(boost::array& cont) { + return typename sprout::container_traits >::iterator(cont, cont.size()); + } + static SPROUT_CONSTEXPR typename sprout::container_traits const>::iterator + range_end(boost::array const& cont) { + return typename sprout::container_traits const>::iterator(cont, cont.size()); + } + }; +} // namespace sprout +#endif + +#endif // #ifndef SPROUT_CONTAINER_BOOST_ARRAY_HPP diff --git a/sprout/functional/hash/boost/array.hpp b/sprout/functional/hash/boost/array.hpp new file mode 100644 index 00000000..b3cff92d --- /dev/null +++ b/sprout/functional/hash/boost/array.hpp @@ -0,0 +1,31 @@ +/*============================================================================= + Copyright (c) 2011-2016 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_FUNCTIONAL_HASH_BOOST_ARRAY_HPP +#define SPROUT_FUNCTIONAL_HASH_BOOST_ARRAY_HPP + +#include +#include +#include +#include +#include + +namespace sprout { + // + // hash_value_traits + // + template + struct hash_value_traits > { + public: + static SPROUT_CONSTEXPR std::size_t + hash_value(boost::array const& v) { + return sprout::hash_range(v); + } + }; +} // namespace sprout + +#endif // #ifndef SPROUT_FUNCTIONAL_HASH_BOOST_ARRAY_HPP diff --git a/sprout/functional/hash/hash_value.hpp b/sprout/functional/hash/hash_value.hpp index 86f9ccfc..e1ebf4b4 100644 --- a/sprout/functional/hash/hash_value.hpp +++ b/sprout/functional/hash/hash_value.hpp @@ -8,18 +8,163 @@ #ifndef SPROUT_FUNCTIONAL_HASH_HASH_VALUE_HPP #define SPROUT_FUNCTIONAL_HASH_HASH_VALUE_HPP +#include +#include #include #include +#include #include +#include +#include +#include +#include namespace sprout { + namespace hash_detail { + template + struct is_basic_number + : public sprout::bool_constant< + std::is_integral::value + && (sizeof(T) <= sizeof(std::size_t)) + > + {}; + template + struct is_long_number + : public sprout::bool_constant< + std::is_integral::value + && (sizeof(T) > sizeof(std::size_t)) + && sprout::is_signed::value + > + {}; + template + struct is_ulong_number + : public sprout::bool_constant< + std::is_integral::value + && (sizeof(T) > sizeof(std::size_t)) + && sprout::is_unsigned::value + > + {}; + + template + inline SPROUT_CONSTEXPR std::size_t + hash_value_signed_2(T val, int length, std::size_t seed, T positive, std::size_t i) { + return i > 0 + ? hash_value_signed_2( + val, + length, + seed ^ static_cast((positive >> i) + (seed << 6) + (seed >> 2)), + positive, + i - sprout::numeric_limits::digits + ) + : seed ^ static_cast(val + (seed << 6) + (seed >> 2)) + ; + } + template + inline SPROUT_CONSTEXPR std::size_t + hash_value_signed_1(T val, int length, std::size_t seed, T positive) { + return hash_value_signed_2(val, length, seed, positive, length * sprout::numeric_limits::digits); + } + template + inline SPROUT_CONSTEXPR std::size_t + hash_value_signed(T val) { + return sprout::hash_detail::hash_value_signed_1( + val, + (sprout::numeric_limits::digits - 1) / sprout::numeric_limits::digits, + 0, + val < 0 ? -1 - val : val + ); + } + + template + inline SPROUT_CONSTEXPR std::size_t + hash_value_unsigned_2(T val, int length, std::size_t seed, std::size_t i) { + return i > 0 + ? hash_value_unsigned_2( + val, + length, + seed ^ static_cast((val >> i) + (seed << 6) + (seed >> 2)), + i - sprout::numeric_limits::digits + ) + : seed ^ static_cast(val + (seed << 6) + (seed >> 2)) + ; + } + template + inline SPROUT_CONSTEXPR std::size_t + hash_value_unsigned_1(T val, int length, std::size_t seed) { + return hash_value_unsigned_2(val, length, seed, length * sprout::numeric_limits::digits); + } + template + inline SPROUT_CONSTEXPR std::size_t + hash_value_unsigned(T val) { + return sprout::hash_detail::hash_value_unsigned_1( + val, + (sprout::numeric_limits::digits - 1) / sprout::numeric_limits::digits, + 0 + ); + } + + inline std::size_t + hash_value_pointer_1(std::size_t x) { + return x + (x >> 3); + } + template + std::size_t + hash_value_pointer(T const* v) { + return sprout::hash_detail::hash_value_pointer_1(static_cast(reinterpret_cast(v))); + } + + template + inline SPROUT_CONSTEXPR typename std::enable_if::value, std::size_t>::type + hash_value_impl(T v) { + return static_cast(v); + } + template + inline SPROUT_CONSTEXPR typename std::enable_if::value, std::size_t>::type + hash_value_impl(T v) { + return sprout::hash_detail::hash_value_signed(v); + } + template + inline SPROUT_CONSTEXPR typename std::enable_if::value, std::size_t>::type + hash_value_impl(T v) { + return sprout::hash_detail::hash_value_unsigned(v); + } + template + inline SPROUT_CONSTEXPR typename std::enable_if::value, std::size_t>::type + hash_value_impl(T v) { + return sprout::hash_detail::hash_value_impl(static_cast::type>(v)); + } + template + inline SPROUT_CONSTEXPR typename std::enable_if::value, std::size_t>::type + hash_value_impl(T v) { + return sprout::detail::float_hash_value(v); + } + template + inline SPROUT_CONSTEXPR typename std::enable_if::type>::value, std::size_t>::type + hash_value_impl(T&& v) { + return sprout::hash_detail::hash_value_pointer(v); + } + template + inline SPROUT_CONSTEXPR std::size_t + hash_value_impl(T const (& v)[N]) { + return sprout::hash_range(v); + } + template + inline SPROUT_CONSTEXPR typename std::enable_if< + !std::is_arithmetic::value && !std::is_enum::value && !std::is_pointer::value, + std::size_t + >::type + hash_value_impl(T const& v) { + return std::hash::type>()(v); + } + } // namespace hash_detail + // // hash_value // template inline SPROUT_CONSTEXPR std::size_t hash_value(T const& v) { - return sprout::hash_value_traits::hash_value(v); + return sprout::hash_detail::hash_value_impl(v); } } // namespace sprout diff --git a/sprout/functional/hash/hash_value_traits.hpp b/sprout/functional/hash/hash_value_traits.hpp index 0ea47a4d..ae7a223a 100644 --- a/sprout/functional/hash/hash_value_traits.hpp +++ b/sprout/functional/hash/hash_value_traits.hpp @@ -8,156 +8,26 @@ #ifndef SPROUT_FUNCTIONAL_HASH_HASH_VALUE_TRAITS_HPP #define SPROUT_FUNCTIONAL_HASH_HASH_VALUE_TRAITS_HPP -#include -#include #include #include -#include #include -#include -#include -#include -#include +#include + +namespace sprout_adl { + sprout::not_found_via_adl hash_value(...); +} // namespace sprout_adl + +namespace sprout_hash_detail { + template + inline SPROUT_CONSTEXPR std::size_t + call_hash_value(T const& v) { + using sprout::hash_value; + using sprout_adl::hash_value; + return hash_value(v); + } +} // namespace sprout_hash_detail namespace sprout { - namespace hash_detail { - template - struct is_basic_number - : public sprout::bool_constant< - std::is_integral::value - && (sizeof(T) <= sizeof(std::size_t)) - > - {}; - template - struct is_long_number - : public sprout::bool_constant< - std::is_integral::value - && (sizeof(T) > sizeof(std::size_t)) - && sprout::is_signed::value - > - {}; - template - struct is_ulong_number - : public sprout::bool_constant< - std::is_integral::value - && (sizeof(T) > sizeof(std::size_t)) - && sprout::is_unsigned::value - > - {}; - - template - inline SPROUT_CONSTEXPR std::size_t - hash_value_signed_2(T val, int length, std::size_t seed, T positive, std::size_t i) { - return i > 0 - ? hash_value_signed_2( - val, - length, - seed ^ static_cast((positive >> i) + (seed << 6) + (seed >> 2)), - positive, - i - sprout::numeric_limits::digits - ) - : seed ^ static_cast(val + (seed << 6) + (seed >> 2)) - ; - } - template - inline SPROUT_CONSTEXPR std::size_t - hash_value_signed_1(T val, int length, std::size_t seed, T positive) { - return hash_value_signed_2(val, length, seed, positive, length * sprout::numeric_limits::digits); - } - template - inline SPROUT_CONSTEXPR std::size_t - hash_value_signed(T val) { - return sprout::hash_detail::hash_value_signed_1( - val, - (sprout::numeric_limits::digits - 1) / sprout::numeric_limits::digits, - 0, - val < 0 ? -1 - val : val - ); - } - - template - inline SPROUT_CONSTEXPR std::size_t - hash_value_unsigned_2(T val, int length, std::size_t seed, std::size_t i) { - return i > 0 - ? hash_value_unsigned_2( - val, - length, - seed ^ static_cast((val >> i) + (seed << 6) + (seed >> 2)), - i - sprout::numeric_limits::digits - ) - : seed ^ static_cast(val + (seed << 6) + (seed >> 2)) - ; - } - template - inline SPROUT_CONSTEXPR std::size_t - hash_value_unsigned_1(T val, int length, std::size_t seed) { - return hash_value_unsigned_2(val, length, seed, length * sprout::numeric_limits::digits); - } - template - inline SPROUT_CONSTEXPR std::size_t - hash_value_unsigned(T val) { - return sprout::hash_detail::hash_value_unsigned_1( - val, - (sprout::numeric_limits::digits - 1) / sprout::numeric_limits::digits, - 0 - ); - } - - inline std::size_t - hash_value_pointer_1(std::size_t x) { - return x + (x >> 3); - } - template - std::size_t - hash_value_pointer(T const* v) { - return sprout::hash_detail::hash_value_pointer_1(static_cast(reinterpret_cast(v))); - } - - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, std::size_t>::type - hash_value_impl(T v) { - return static_cast(v); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, std::size_t>::type - hash_value_impl(T v) { - return sprout::hash_detail::hash_value_signed(v); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, std::size_t>::type - hash_value_impl(T v) { - return sprout::hash_detail::hash_value_unsigned(v); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, std::size_t>::type - hash_value_impl(T v) { - return sprout::hash_detail::hash_value_impl(static_cast::type>(v)); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::value, std::size_t>::type - hash_value_impl(T v) { - return sprout::detail::float_hash_value(v); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if::type>::value, std::size_t>::type - hash_value_impl(T&& v) { - return sprout::hash_detail::hash_value_pointer(v); - } - template - inline SPROUT_CONSTEXPR std::size_t - hash_value_impl(T const (& v)[N]) { - return sprout::hash_range(v); - } - template - inline SPROUT_CONSTEXPR typename std::enable_if< - !std::is_arithmetic::value && !std::is_enum::value && !std::is_pointer::value, - std::size_t - >::type - hash_value_impl(T const& v) { - return std::hash::type>()(v); - } - } // namespace hash_detail - // // hash_value_traits // @@ -166,7 +36,7 @@ namespace sprout { public: static SPROUT_CONSTEXPR std::size_t hash_value(T const& v) { - return sprout::hash_detail::hash_value_impl(v); + return sprout_hash_detail::call_hash_value(v); } }; template @@ -184,5 +54,6 @@ namespace sprout { } // namespace sprout #include +#include #endif // #ifndef SPROUT_FUNCTIONAL_HASH_HASH_VALUE_TRAITS_HPP diff --git a/sprout/functional/hash/to_hash.hpp b/sprout/functional/hash/to_hash.hpp index 071fe1a4..659b1da6 100644 --- a/sprout/functional/hash/to_hash.hpp +++ b/sprout/functional/hash/to_hash.hpp @@ -11,33 +11,26 @@ #include #include #include -#include -#include - -namespace sprout_adl { - sprout::not_found_via_adl hash_value(...); -} // namespace sprout_adl namespace sprout { // // to_hash // // effect: - // ADL callable hash_value(v) -> hash_value(v) - // otherwise -> sprout::hash_value_traits::hash_value(v) + // sprout::hash_value_traits::hash_value(v) // [default] - // v is Arithmetic || Enum || Pointer || Array -> implementation-defined - // otherwise -> std::hash()(v) + // ADL callable hash_value(v) -> hash_value(v) + // [default] + // T is Arithmetic || Enum || Pointer || Array -> implementation-defined + // otherwise -> std::hash()(v) // template inline SPROUT_CONSTEXPR std::size_t to_hash(T&& v) { - using sprout::hash_value; - using sprout_adl::hash_value; - return hash_value(SPROUT_FORWARD(T, v)); + return sprout::hash_value_traits::hash_value(v); } } // namespace sprout -#include +#include #endif // #ifndef SPROUT_FUNCTIONAL_HASH_TO_HASH_HPP diff --git a/sprout/tuple/boost/array.hpp b/sprout/tuple/boost/array.hpp new file mode 100644 index 00000000..6b4e7fc4 --- /dev/null +++ b/sprout/tuple/boost/array.hpp @@ -0,0 +1,48 @@ +/*============================================================================= + Copyright (c) 2011-2016 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_TUPLE_BOOST_ARRAY_HPP +#define SPROUT_TUPLE_BOOST_ARRAY_HPP + +#include +#include +#include +#include +#include +#include +#include + +namespace sprout { + namespace tuples { + // + // tuple_access_traits + // + template + struct tuple_access_traits > { + public: + template + static SPROUT_CONSTEXPR T& + tuple_get(boost::array& t) SPROUT_NOEXCEPT { + static_assert(I < N, "tuple_get: index out of range"); + return t[I]; + } + template + static SPROUT_CONSTEXPR T const& + tuple_get(boost::array const& t) SPROUT_NOEXCEPT { + static_assert(I < N, "tuple_get: index out of range"); + return t[I]; + } + template + static SPROUT_CONSTEXPR T&& + tuple_get(boost::array&& t) SPROUT_NOEXCEPT { + return sprout::move(tuple_get(t)); + } + }; + } // namespace tuples +} // namespace sprout + +#endif // #ifndef SPROUT_TUPLE_BOOST_ARRAY_HPP diff --git a/sprout/type_traits/has_arithmetic_operator.hpp b/sprout/type_traits/has_arithmetic_operator.hpp new file mode 100644 index 00000000..e89ee012 --- /dev/null +++ b/sprout/type_traits/has_arithmetic_operator.hpp @@ -0,0 +1,22 @@ +/*============================================================================= + Copyright (c) 2011-2016 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_TYPE_TRAITS_HAS_ARITHMETIC_OPERATOR_HPP +#define SPROUT_TYPE_TRAITS_HAS_ARITHMETIC_OPERATOR_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_ARITHMETIC_OPERATOR_HPP diff --git a/sprout/type_traits/has_assignment_operator.hpp b/sprout/type_traits/has_assignment_operator.hpp new file mode 100644 index 00000000..55398d3e --- /dev/null +++ b/sprout/type_traits/has_assignment_operator.hpp @@ -0,0 +1,26 @@ +/*============================================================================= + Copyright (c) 2011-2016 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_TYPE_TRAITS_HAS_ASSIGNMENT_OPERATOR_HPP +#define SPROUT_TYPE_TRAITS_HAS_ASSIGNMENT_OPERATOR_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_ASSIGNMENT_OPERATOR_HPP diff --git a/sprout/type_traits/has_bitwise_operator.hpp b/sprout/type_traits/has_bitwise_operator.hpp new file mode 100644 index 00000000..0b86b736 --- /dev/null +++ b/sprout/type_traits/has_bitwise_operator.hpp @@ -0,0 +1,22 @@ +/*============================================================================= + Copyright (c) 2011-2016 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_TYPE_TRAITS_HAS_BITWAISE_OPERATOR_HPP +#define SPROUT_TYPE_TRAITS_HAS_BITWAISE_OPERATOR_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_BITWAISE_OPERATOR_HPP diff --git a/sprout/type_traits/has_comparison_operator.hpp b/sprout/type_traits/has_comparison_operator.hpp new file mode 100644 index 00000000..0fa5ec93 --- /dev/null +++ b/sprout/type_traits/has_comparison_operator.hpp @@ -0,0 +1,19 @@ +/*============================================================================= + Copyright (c) 2011-2016 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_TYPE_TRAITS_HAS_COMPARISON_OPERATOR_HPP +#define SPROUT_TYPE_TRAITS_HAS_COMPARISON_OPERATOR_HPP + +#include +#include +#include +#include +#include +#include +#include + +#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_COMPARISON_OPERATOR_HPP diff --git a/sprout/type_traits/has_inc_dec_operator.hpp b/sprout/type_traits/has_inc_dec_operator.hpp new file mode 100644 index 00000000..f7c889a0 --- /dev/null +++ b/sprout/type_traits/has_inc_dec_operator.hpp @@ -0,0 +1,17 @@ +/*============================================================================= + Copyright (c) 2011-2016 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_TYPE_TRAITS_HAS_INC_DEC_OPERATOR_HPP +#define SPROUT_TYPE_TRAITS_HAS_INC_DEC_OPERATOR_HPP + +#include +#include +#include +#include +#include + +#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_INC_DEC_OPERATOR_HPP diff --git a/sprout/type_traits/has_logical_operator.hpp b/sprout/type_traits/has_logical_operator.hpp new file mode 100644 index 00000000..61931344 --- /dev/null +++ b/sprout/type_traits/has_logical_operator.hpp @@ -0,0 +1,16 @@ +/*============================================================================= + Copyright (c) 2011-2016 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_TYPE_TRAITS_HAS_LOGICAL_OPERATOR_HPP +#define SPROUT_TYPE_TRAITS_HAS_LOGICAL_OPERATOR_HPP + +#include +#include +#include +#include + +#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_LOGICAL_OPERATOR_HPP diff --git a/sprout/type_traits/has_members_operator.hpp b/sprout/type_traits/has_members_operator.hpp new file mode 100644 index 00000000..14a67fb0 --- /dev/null +++ b/sprout/type_traits/has_members_operator.hpp @@ -0,0 +1,15 @@ +/*============================================================================= + Copyright (c) 2011-2016 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_TYPE_TRAITS_HAS_MEMBERS_OPERATOR_HPP +#define SPROUT_TYPE_TRAITS_HAS_MEMBERS_OPERATOR_HPP + +#include +#include +#include + +#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_MEMBERS_OPERATOR_HPP diff --git a/sprout/type_traits/has_operator.hpp b/sprout/type_traits/has_operator.hpp index 9fa0a1f8..10681fb5 100644 --- a/sprout/type_traits/has_operator.hpp +++ b/sprout/type_traits/has_operator.hpp @@ -9,64 +9,14 @@ #define SPROUT_TYPE_TRAITS_HAS_OPERATOR_HPP #include -// arithmetic -#include -#include -#include -#include -#include -#include -#include -#include -#include -// comparison -#include -#include -#include -#include -#include -#include -// logical -#include -#include -#include -// bitwise -#include -#include -#include -#include -#include -#include -#include -#include -#include -// inc_dec -#include -#include -#include -#include -// reference -#include -#include -// assignment -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -// members -#include -#include -// various -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #endif // #ifndef SPROUT_TYPE_TRAITS_HAS_OPERATOR_HPP diff --git a/sprout/type_traits/has_reference_operator.hpp b/sprout/type_traits/has_reference_operator.hpp new file mode 100644 index 00000000..1ad6df73 --- /dev/null +++ b/sprout/type_traits/has_reference_operator.hpp @@ -0,0 +1,15 @@ +/*============================================================================= + Copyright (c) 2011-2016 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_TYPE_TRAITS_HAS_REFERENCE_OPERATOR_HPP +#define SPROUT_TYPE_TRAITS_HAS_REFERENCE_OPERATOR_HPP + +#include +#include +#include + +#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_REFERENCE_OPERATOR_HPP diff --git a/sprout/type_traits/has_various_operator.hpp b/sprout/type_traits/has_various_operator.hpp new file mode 100644 index 00000000..7a8602c5 --- /dev/null +++ b/sprout/type_traits/has_various_operator.hpp @@ -0,0 +1,15 @@ +/*============================================================================= + Copyright (c) 2011-2016 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_TYPE_TRAITS_HAS_VARIOUS_OPERATOR_HPP +#define SPROUT_TYPE_TRAITS_HAS_VARIOUS_OPERATOR_HPP + +#include +#include +#include + +#endif // #ifndef SPROUT_TYPE_TRAITS_HAS_VARIOUS_OPERATOR_HPP