arranged type_traits headers

This commit is contained in:
bolero-MURAKAMI 2015-04-05 01:32:49 +09:00
parent 0bfeeb755a
commit b578294eb8
46 changed files with 372 additions and 165 deletions

View file

@ -10,7 +10,7 @@
#include <sprout/config.hpp>
#include <sprout/type_traits/integral_constant.hpp>
#include <sprout/type_traits/std_type_traits.hpp>
#include <sprout/type_traits/is_same.hpp>
namespace sprout {
//

View file

@ -12,7 +12,8 @@
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/algorithm/cxx14/detail/sort_tool.hpp>
#include <sprout/type_traits/std_type_traits.hpp>
#include <sprout/type_traits/is_trivially_copy_constructible.hpp>
#include <sprout/type_traits/is_trivially_copy_assignable.hpp>
#include <sprout/utility/swap.hpp>
#include HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT

View file

@ -10,7 +10,8 @@
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/type_traits/std_type_traits.hpp>
#include <sprout/type_traits/is_signed.hpp>
#include <sprout/type_traits/is_unsigned.hpp>
namespace sprout {
namespace detail {

View file

@ -13,7 +13,8 @@
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/type_traits/std_type_traits.hpp>
#include <sprout/type_traits/is_signed.hpp>
#include <sprout/type_traits/is_unsigned.hpp>
namespace sprout {

View file

@ -12,7 +12,8 @@
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/limits.hpp>
#include <sprout/type_traits/std_type_traits.hpp>
#include <sprout/type_traits/is_signed.hpp>
#include <sprout/type_traits/is_unsigned.hpp>
#include <sprout/iterator/operation.hpp>
#include <sprout/ctype/ascii.hpp>
#include <sprout/detail/char_literal.hpp>

View file

@ -13,7 +13,8 @@
#include <sprout/config.hpp>
#include <sprout/workaround/std/cstddef.hpp>
#include <sprout/limits.hpp>
#include <sprout/type_traits/std_type_traits.hpp>
#include <sprout/type_traits/is_signed.hpp>
#include <sprout/type_traits/is_unsigned.hpp>
#include <sprout/iterator/operation.hpp>
#include <sprout/ctype/ascii.hpp>
#include <sprout/detail/char_literal.hpp>

View file

@ -15,7 +15,9 @@
#include <sprout/limits.hpp>
#include <sprout/functional/hash/hash_fwd.hpp>
#include <sprout/functional/hash/detail/hash_float.hpp>
#include <sprout/type_traits/std_type_traits.hpp>
#include <sprout/type_traits/integral_constant.hpp>
#include <sprout/type_traits/is_signed.hpp>
#include <sprout/type_traits/is_unsigned.hpp>
namespace sprout {
namespace hash_detail {

View file

@ -12,7 +12,8 @@
#include <functional>
#include <sprout/config.hpp>
#include <sprout/utility/forward.hpp>
#include <sprout/type_traits/std_type_traits.hpp>
#include <sprout/type_traits/integral_constant.hpp>
#include <sprout/type_traits/result_of.hpp>
#include <sprout/type_traits/identity.hpp>
#include <sprout/type_traits/has_xxx.hpp>
#include <sprout/type_traits/inherit_if_xxx.hpp>

View file

@ -12,7 +12,8 @@
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/workaround/std/cstddef.hpp>
#include <sprout/type_traits/std_type_traits.hpp>
#include <sprout/type_traits/integral_constant.hpp>
#include <sprout/type_traits/is_signed.hpp>
namespace sprout {
namespace detail {

View file

@ -17,7 +17,7 @@
#include <sprout/iterator/distance.hpp>
#include <sprout/iterator/type_traits/common.hpp>
#include <sprout/utility/swap.hpp>
#include <sprout/type_traits/std_type_traits.hpp>
#include <sprout/type_traits/result_of.hpp>
namespace sprout {
//

View file

@ -10,7 +10,7 @@
#include <iterator>
#include <sprout/config.hpp>
#include <sprout/type_traits/std_type_traits.hpp>
#include <sprout/type_traits/is_convertible.hpp>
namespace sprout {
//

View file

@ -13,7 +13,8 @@
#include <sprout/math/not_equal_to.hpp>
#include <sprout/type_traits/arithmetic_promote.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#include <sprout/type_traits/std_type_traits.hpp>
#include <sprout/type_traits/is_signed.hpp>
#include <sprout/type_traits/is_unsigned.hpp>
namespace sprout {
namespace math {

View file

@ -13,7 +13,8 @@
#include <sprout/math/equal_to.hpp>
#include <sprout/type_traits/arithmetic_promote.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#include <sprout/type_traits/std_type_traits.hpp>
#include <sprout/type_traits/is_signed.hpp>
#include <sprout/type_traits/is_unsigned.hpp>
namespace sprout {
namespace math {

View file

@ -13,7 +13,8 @@
#include <sprout/math/not_equal_to.hpp>
#include <sprout/type_traits/arithmetic_promote.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#include <sprout/type_traits/std_type_traits.hpp>
#include <sprout/type_traits/is_signed.hpp>
#include <sprout/type_traits/is_unsigned.hpp>
namespace sprout {
namespace math {

View file

@ -13,7 +13,8 @@
#include <sprout/math/equal_to.hpp>
#include <sprout/type_traits/arithmetic_promote.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#include <sprout/type_traits/std_type_traits.hpp>
#include <sprout/type_traits/is_signed.hpp>
#include <sprout/type_traits/is_unsigned.hpp>
namespace sprout {
namespace math {

View file

@ -17,7 +17,7 @@
#include <sprout/utility/swap.hpp>
#include <sprout/utility/forward.hpp>
#include <sprout/utility/move.hpp>
#include <sprout/type_traits/std_type_traits.hpp>
#include <sprout/type_traits/is_constructible.hpp>
#include <sprout/type_traits/is_convert_constructible.hpp>
#include <sprout/none.hpp>
#include <sprout/optional/nullopt.hpp>

View file

@ -15,7 +15,9 @@
#include <sprout/string/string.hpp>
#include <sprout/integer/integer_digits.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#include <sprout/type_traits/std_type_traits.hpp>
#include <sprout/type_traits/integral_constant.hpp>
#include <sprout/type_traits/is_signed.hpp>
#include <sprout/type_traits/is_unsigned.hpp>
#include <sprout/detail/char_literal.hpp>
#include <sprout/detail/char_conversion.hpp>
#include <sprout/detail/math/int.hpp>

View file

@ -10,34 +10,7 @@
#include <sprout/config.hpp>
#include <sprout/type_traits/std.hpp>
#include <sprout/type_traits/is_convert_constructible.hpp>
#include <sprout/type_traits/is_const_unqualified.hpp>
#include <sprout/type_traits/is_volatile_unqualified.hpp>
#include <sprout/type_traits/is_cv_unqualified.hpp>
#include <sprout/type_traits/is_sint.hpp>
#include <sprout/type_traits/is_uint.hpp>
#include <sprout/type_traits/is_char_type.hpp>
#include <sprout/type_traits/is_c_str.hpp>
#include <sprout/type_traits/is_nullptr_cast.hpp>
#include <sprout/type_traits/is_upcast.hpp>
#include <sprout/type_traits/has_type.hpp>
#include <sprout/type_traits/has_value.hpp>
#include <sprout/type_traits/identity.hpp>
#include <sprout/type_traits/lvalue_reference.hpp>
#include <sprout/type_traits/const_reference.hpp>
#include <sprout/type_traits/remove_cvref.hpp>
#include <sprout/type_traits/remove_shallow_const.hpp>
#include <sprout/type_traits/remove_shallow_volatile.hpp>
#include <sprout/type_traits/remove_shallow_cv.hpp>
#include <sprout/type_traits/remove_shallow_cvref.hpp>
#include <sprout/type_traits/common_decay.hpp>
#include <sprout/type_traits/arithmetic_promote.hpp>
#include <sprout/type_traits/float_promote.hpp>
#include <sprout/type_traits/complex_promote.hpp>
#include <sprout/type_traits/inherit_if_type.hpp>
#include <sprout/type_traits/enable_if.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#include <sprout/type_traits/has_xxx.hpp>
#include <sprout/type_traits/inherit_if_xxx.hpp>
#include <sprout/type_traits/composite_modification.hpp>
#include <sprout/type_traits/introspection.hpp>
#endif // #ifndef SPROUT_TYPE_TRAITS_HPP

View file

@ -0,0 +1,16 @@
/*=============================================================================
Copyright (c) 2011-2015 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_ARRAY_MODIFICATION_HPP
#define SPROUT_TYPE_TRAITS_ARRAY_MODIFICATION_HPP
#include <sprout/config.hpp>
// 20.10.7.4 Array modifications
#include <sprout/type_traits/remove_extent.hpp>
#include <sprout/type_traits/remove_all_extents.hpp>
#endif // #ifndef SPROUT_TYPE_TRAITS_ARRAY_MODIFICATION_HPP

View file

@ -0,0 +1,28 @@
/*=============================================================================
Copyright (c) 2011-2015 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_CATEGORY_HPP
#define SPROUT_TYPE_TRAITS_CATEGORY_HPP
#include <sprout/config.hpp>
// 20.10.4.1, primary type categories
#include <sprout/type_traits/is_void.hpp>
#include <sprout/type_traits/is_null_pointer.hpp>
#include <sprout/type_traits/is_integral.hpp>
#include <sprout/type_traits/is_floating_point.hpp>
#include <sprout/type_traits/is_array.hpp>
#include <sprout/type_traits/is_pointer.hpp>
#include <sprout/type_traits/is_lvalue_reference.hpp>
#include <sprout/type_traits/is_rvalue_reference.hpp>
#include <sprout/type_traits/is_member_object_pointer.hpp>
#include <sprout/type_traits/is_member_function_pointer.hpp>
#include <sprout/type_traits/is_enum.hpp>
#include <sprout/type_traits/is_union.hpp>
#include <sprout/type_traits/is_class.hpp>
#include <sprout/type_traits/is_function.hpp>
#endif // #ifndef SPROUT_TYPE_TRAITS_CATEGORY_HPP

View file

@ -0,0 +1,21 @@
/*=============================================================================
Copyright (c) 2011-2015 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_COMPOSITE_CATEGORY_HPP
#define SPROUT_TYPE_TRAITS_COMPOSITE_CATEGORY_HPP
#include <sprout/config.hpp>
// 20.10.4.2 Composite type traits
#include <sprout/type_traits/is_reference.hpp>
#include <sprout/type_traits/is_arithmetic.hpp>
#include <sprout/type_traits/is_fundamental.hpp>
#include <sprout/type_traits/is_object.hpp>
#include <sprout/type_traits/is_scalar.hpp>
#include <sprout/type_traits/is_compound.hpp>
#include <sprout/type_traits/is_member_pointer.hpp>
#endif // #ifndef SPROUT_TYPE_TRAITS_COMPOSITE_CATEGORY_HPP

View file

@ -0,0 +1,20 @@
/*=============================================================================
Copyright (c) 2011-2015 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_COMPOSITE_MODIFICATION_HPP
#define SPROUT_TYPE_TRAITS_COMPOSITE_MODIFICATION_HPP
#include <sprout/config.hpp>
#include <sprout/type_traits/lvalue_reference.hpp>
#include <sprout/type_traits/const_reference.hpp>
#include <sprout/type_traits/remove_cvref.hpp>
#include <sprout/type_traits/remove_shallow_const.hpp>
#include <sprout/type_traits/remove_shallow_volatile.hpp>
#include <sprout/type_traits/remove_shallow_cv.hpp>
#include <sprout/type_traits/remove_shallow_cvref.hpp>
#endif // #ifndef SPROUT_TYPE_TRAITS_COMPOSITE_MODIFICATION_HPP

View file

@ -0,0 +1,20 @@
/*=============================================================================
Copyright (c) 2011-2015 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_CV_MODIFICATION_HPP
#define SPROUT_TYPE_TRAITS_CV_MODIFICATION_HPP
#include <sprout/config.hpp>
// 20.10.7.1 Const-volatile modifications
#include <sprout/type_traits/remove_const.hpp>
#include <sprout/type_traits/remove_volatile.hpp>
#include <sprout/type_traits/remove_cv.hpp>
#include <sprout/type_traits/add_const.hpp>
#include <sprout/type_traits/add_volatile.hpp>
#include <sprout/type_traits/add_cv.hpp>
#endif // #ifndef SPROUT_TYPE_TRAITS_CV_MODIFICATION_HPP

View file

@ -0,0 +1,15 @@
/*=============================================================================
Copyright (c) 2011-2015 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_INTROSPECTION_HPP
#define SPROUT_TYPE_TRAITS_INTROSPECTION_HPP
#include <sprout/config.hpp>
#include <sprout/type_traits/has_xxx.hpp>
#include <sprout/type_traits/inherit_if_xxx.hpp>
#endif // #ifndef SPROUT_TYPE_TRAITS_INTROSPECTION_HPP

View file

@ -8,10 +8,12 @@
#ifndef SPROUT_TYPE_TRAITS_IS_NULLPTR_CAST_HPP
#define SPROUT_TYPE_TRAITS_IS_NULLPTR_CAST_HPP
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/workaround/std/cstddef.hpp>
#include <sprout/type_traits/integral_constant.hpp>
#include <sprout/type_traits/std_type_traits.hpp>
#include <sprout/type_traits/is_same.hpp>
#include <sprout/type_traits/decay.hpp>
namespace sprout {
//
@ -20,7 +22,7 @@ namespace sprout {
template<typename From, typename To>
struct is_nullptr_cast
: public sprout::bool_constant<
sprout::is_pointer<To>::value && sprout::is_same<typename sprout::decay<From>::type, std::nullptr_t>::value
std::is_pointer<To>::value && sprout::is_same<typename sprout::decay<From>::type, std::nullptr_t>::value
>
{};
} // namespace sprout

View file

@ -10,7 +10,8 @@
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/type_traits/std_type_traits.hpp>
#include <sprout/type_traits/integral_constant.hpp>
#include <sprout/type_traits/is_signed.hpp>
namespace sprout {
//

View file

@ -10,6 +10,7 @@
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/type_traits/is_trivially_assignable.hpp>
#include <sprout/type_traits/detail/type_traits_wrapper.hpp>
namespace sprout {

View file

@ -10,6 +10,7 @@
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/type_traits/is_trivially_constructible.hpp>
#include <sprout/type_traits/detail/type_traits_wrapper.hpp>
namespace sprout {

View file

@ -10,6 +10,7 @@
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/type_traits/is_trivially_constructible.hpp>
#include <sprout/type_traits/detail/type_traits_wrapper.hpp>
namespace sprout {

View file

@ -10,6 +10,7 @@
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/type_traits/is_trivially_assignable.hpp>
#include <sprout/type_traits/detail/type_traits_wrapper.hpp>
namespace sprout {

View file

@ -10,6 +10,7 @@
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/type_traits/is_trivially_constructible.hpp>
#include <sprout/type_traits/detail/type_traits_wrapper.hpp>
namespace sprout {

View file

@ -10,7 +10,8 @@
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/type_traits/std_type_traits.hpp>
#include <sprout/type_traits/integral_constant.hpp>
#include <sprout/type_traits/is_unsigned.hpp>
namespace sprout {
//

View file

@ -8,9 +8,9 @@
#ifndef SPROUT_TYPE_TRAITS_IS_UPCAST_HPP
#define SPROUT_TYPE_TRAITS_IS_UPCAST_HPP
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/type_traits/integral_constant.hpp>
#include <sprout/type_traits/std_type_traits.hpp>
#include <sprout/type_traits/is_nullptr_cast.hpp>
namespace sprout {
@ -21,11 +21,11 @@ namespace sprout {
struct is_upcast
: public sprout::bool_constant<
sprout::is_nullptr_cast<From, To>::value
|| (sprout::is_pointer<To>::value
&& sprout::is_base_of<typename sprout::remove_pointer<To>::type, typename sprout::remove_pointer<typename sprout::decay<From>::type>::type>::value
|| (std::is_pointer<To>::value
&& std::is_base_of<typename std::remove_pointer<To>::type, typename std::remove_pointer<typename std::decay<From>::type>::type>::value
)
|| (sprout::is_reference<To>::value
&& sprout::is_base_of<typename sprout::remove_reference<To>::type, typename sprout::remove_reference<From>::type>::value
|| (std::is_reference<To>::value
&& std::is_base_of<typename std::remove_reference<To>::type, typename std::remove_reference<From>::type>::value
)
>
{};

View file

@ -0,0 +1,16 @@
/*=============================================================================
Copyright (c) 2011-2015 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_POINTER_MODIFICATION_HPP
#define SPROUT_TYPE_TRAITS_POINTER_MODIFICATION_HPP
#include <sprout/config.hpp>
// 20.10.7.5 Pointer modifications
#include <sprout/type_traits/remove_pointer.hpp>
#include <sprout/type_traits/add_pointer.hpp>
#endif // #ifndef SPROUT_TYPE_TRAITS_POINTER_MODIFICATION_HPP

View file

@ -0,0 +1,62 @@
/*=============================================================================
Copyright (c) 2011-2015 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_PROPERTY_HPP
#define SPROUT_TYPE_TRAITS_PROPERTY_HPP
#include <sprout/config.hpp>
// 20.10.4.3 Type properties
#include <sprout/type_traits/is_const.hpp>
#include <sprout/type_traits/is_volatile.hpp>
#include <sprout/type_traits/is_trivial.hpp>
#include <sprout/type_traits/is_trivially_copyable.hpp>
#include <sprout/type_traits/is_standard_layout.hpp>
#include <sprout/type_traits/is_pod.hpp>
#include <sprout/type_traits/is_literal_type.hpp>
#include <sprout/type_traits/is_empty.hpp>
#include <sprout/type_traits/is_polymorphic.hpp>
#include <sprout/type_traits/is_abstract.hpp>
#include <sprout/type_traits/is_final.hpp>
#include <sprout/type_traits/is_signed.hpp>
#include <sprout/type_traits/is_unsigned.hpp>
#include <sprout/type_traits/is_constructible.hpp>
#include <sprout/type_traits/is_default_constructible.hpp>
#include <sprout/type_traits/is_copy_constructible.hpp>
#include <sprout/type_traits/is_move_constructible.hpp>
#include <sprout/type_traits/is_assignable.hpp>
#include <sprout/type_traits/is_copy_assignable.hpp>
#include <sprout/type_traits/is_move_assignable.hpp>
#include <sprout/type_traits/is_destructible.hpp>
#include <sprout/type_traits/is_trivially_constructible.hpp>
#include <sprout/type_traits/is_trivially_default_constructible.hpp>
#include <sprout/type_traits/is_trivially_copy_constructible.hpp>
#include <sprout/type_traits/is_trivially_move_constructible.hpp>
#include <sprout/type_traits/is_trivially_assignable.hpp>
#include <sprout/type_traits/is_trivially_copy_assignable.hpp>
#include <sprout/type_traits/is_trivially_move_assignable.hpp>
#include <sprout/type_traits/is_trivially_destructible.hpp>
#include <sprout/type_traits/is_nothrow_constructible.hpp>
#include <sprout/type_traits/is_nothrow_default_constructible.hpp>
#include <sprout/type_traits/is_nothrow_copy_constructible.hpp>
#include <sprout/type_traits/is_nothrow_move_constructible.hpp>
#include <sprout/type_traits/is_nothrow_assignable.hpp>
#include <sprout/type_traits/is_nothrow_copy_assignable.hpp>
#include <sprout/type_traits/is_nothrow_move_assignable.hpp>
#include <sprout/type_traits/is_nothrow_destructible.hpp>
#include <sprout/type_traits/has_virtual_destructor.hpp>
#include <sprout/type_traits/is_const_unqualified.hpp>
#include <sprout/type_traits/is_volatile_unqualified.hpp>
#include <sprout/type_traits/is_cv_unqualified.hpp>
#include <sprout/type_traits/is_sint.hpp>
#include <sprout/type_traits/is_uint.hpp>
#include <sprout/type_traits/is_char_type.hpp>
#include <sprout/type_traits/is_c_str.hpp>
#include <sprout/type_traits/has_type.hpp>
#include <sprout/type_traits/has_value.hpp>
#endif // #ifndef SPROUT_TYPE_TRAITS_PROPERTY_HPP

View file

@ -0,0 +1,17 @@
/*=============================================================================
Copyright (c) 2011-2015 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_PROPERTY_QUERY_HPP
#define SPROUT_TYPE_TRAITS_PROPERTY_QUERY_HPP
#include <sprout/config.hpp>
// 20.10.5 Type property queries
#include <sprout/type_traits/alignment_of.hpp>
#include <sprout/type_traits/rank.hpp>
#include <sprout/type_traits/extent.hpp>
#endif // #ifndef SPROUT_TYPE_TRAITS_PROPERTY_QUERY_HPP

View file

@ -0,0 +1,17 @@
/*=============================================================================
Copyright (c) 2011-2015 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_REF_MODIFICATION_HPP
#define SPROUT_TYPE_TRAITS_REF_MODIFICATION_HPP
#include <sprout/config.hpp>
// 20.10.7.2 Reference modifications
#include <sprout/type_traits/remove_reference.hpp>
#include <sprout/type_traits/add_lvalue_reference.hpp>
#include <sprout/type_traits/add_rvalue_reference.hpp>
#endif // #ifndef SPROUT_TYPE_TRAITS_REF_MODIFICATION_HPP

View file

@ -0,0 +1,21 @@
/*=============================================================================
Copyright (c) 2011-2015 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_RELATIONSHIP_HPP
#define SPROUT_TYPE_TRAITS_RELATIONSHIP_HPP
#include <sprout/config.hpp>
// 20.10.6 Relationships between types
#include <sprout/type_traits/is_same.hpp>
#include <sprout/type_traits/is_base_of.hpp>
#include <sprout/type_traits/is_convertible.hpp>
#include <sprout/type_traits/is_convert_constructible.hpp>
#include <sprout/type_traits/is_nullptr_cast.hpp>
#include <sprout/type_traits/is_upcast.hpp>
#endif // #ifndef SPROUT_TYPE_TRAITS_RELATIONSHIP_HPP

View file

@ -8,6 +8,7 @@
#ifndef SPROUT_TYPE_TRAITS_REMOVE_SHALLOW_CVREF_HPP
#define SPROUT_TYPE_TRAITS_REMOVE_SHALLOW_CVREF_HPP
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/type_traits/remove_shallow_cv.hpp>
@ -18,7 +19,7 @@ namespace sprout {
template<typename T>
struct remove_shallow_cvref
: public sprout::remove_shallow_cv<
typename sprout::remove_reference<T>::type
typename std::remove_reference<T>::type
>
{};

View file

@ -0,0 +1,16 @@
/*=============================================================================
Copyright (c) 2011-2015 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_SIGN_MODIFICATION_HPP
#define SPROUT_TYPE_TRAITS_SIGN_MODIFICATION_HPP
#include <sprout/config.hpp>
// 20.10.7.3 Sign modifications
#include <sprout/type_traits/make_signed.hpp>
#include <sprout/type_traits/make_unsigned.hpp>
#endif // #ifndef SPROUT_TYPE_TRAITS_SIGN_MODIFICATION_HPP

View file

@ -9,7 +9,6 @@
#define SPROUT_TYPE_TRAITS_STD_HPP
#include <sprout/config.hpp>
#include <sprout/type_traits/integral_constant.hpp>
#include <sprout/type_traits/std_type_traits.hpp>
#include <sprout/type_traits/std_type_aliases.hpp>
#include <sprout/type_traits/std_value_variables.hpp>

View file

@ -9,106 +9,17 @@
#define SPROUT_TYPE_TRAITS_STD_TYPE_TRAITS_HPP
#include <sprout/config.hpp>
// 20.10.3, helper class:
#include <sprout/type_traits/integral_constant.hpp>
// 20.10.4.1, primary type categories:
#include <sprout/type_traits/is_void.hpp>
#include <sprout/type_traits/is_null_pointer.hpp>
#include <sprout/type_traits/is_integral.hpp>
#include <sprout/type_traits/is_floating_point.hpp>
#include <sprout/type_traits/is_array.hpp>
#include <sprout/type_traits/is_pointer.hpp>
#include <sprout/type_traits/is_lvalue_reference.hpp>
#include <sprout/type_traits/is_rvalue_reference.hpp>
#include <sprout/type_traits/is_member_object_pointer.hpp>
#include <sprout/type_traits/is_member_function_pointer.hpp>
#include <sprout/type_traits/is_enum.hpp>
#include <sprout/type_traits/is_union.hpp>
#include <sprout/type_traits/is_class.hpp>
#include <sprout/type_traits/is_function.hpp>
// 20.10.4.2 Composite type traits
#include <sprout/type_traits/is_reference.hpp>
#include <sprout/type_traits/is_arithmetic.hpp>
#include <sprout/type_traits/is_fundamental.hpp>
#include <sprout/type_traits/is_object.hpp>
#include <sprout/type_traits/is_scalar.hpp>
#include <sprout/type_traits/is_compound.hpp>
#include <sprout/type_traits/is_member_pointer.hpp>
// 20.10.4.3 Type properties
#include <sprout/type_traits/is_const.hpp>
#include <sprout/type_traits/is_volatile.hpp>
#include <sprout/type_traits/is_trivial.hpp>
#include <sprout/type_traits/is_trivially_copyable.hpp>
#include <sprout/type_traits/is_standard_layout.hpp>
#include <sprout/type_traits/is_pod.hpp>
#include <sprout/type_traits/is_literal_type.hpp>
#include <sprout/type_traits/is_empty.hpp>
#include <sprout/type_traits/is_polymorphic.hpp>
#include <sprout/type_traits/is_abstract.hpp>
#include <sprout/type_traits/is_final.hpp>
#include <sprout/type_traits/is_signed.hpp>
#include <sprout/type_traits/is_unsigned.hpp>
#include <sprout/type_traits/is_constructible.hpp>
#include <sprout/type_traits/is_default_constructible.hpp>
#include <sprout/type_traits/is_copy_constructible.hpp>
#include <sprout/type_traits/is_move_constructible.hpp>
#include <sprout/type_traits/is_assignable.hpp>
#include <sprout/type_traits/is_copy_assignable.hpp>
#include <sprout/type_traits/is_move_assignable.hpp>
#include <sprout/type_traits/is_destructible.hpp>
#include <sprout/type_traits/is_trivially_constructible.hpp>
#include <sprout/type_traits/is_trivially_default_constructible.hpp>
#include <sprout/type_traits/is_trivially_copy_constructible.hpp>
#include <sprout/type_traits/is_trivially_move_constructible.hpp>
#include <sprout/type_traits/is_trivially_assignable.hpp>
#include <sprout/type_traits/is_trivially_copy_assignable.hpp>
#include <sprout/type_traits/is_trivially_move_assignable.hpp>
#include <sprout/type_traits/is_trivially_destructible.hpp>
#include <sprout/type_traits/is_nothrow_constructible.hpp>
#include <sprout/type_traits/is_nothrow_default_constructible.hpp>
#include <sprout/type_traits/is_nothrow_copy_constructible.hpp>
#include <sprout/type_traits/is_nothrow_move_constructible.hpp>
#include <sprout/type_traits/is_nothrow_assignable.hpp>
#include <sprout/type_traits/is_nothrow_copy_assignable.hpp>
#include <sprout/type_traits/is_nothrow_move_assignable.hpp>
#include <sprout/type_traits/is_nothrow_destructible.hpp>
#include <sprout/type_traits/has_virtual_destructor.hpp>
// 20.10.5 Type property queries
#include <sprout/type_traits/alignment_of.hpp>
#include <sprout/type_traits/rank.hpp>
#include <sprout/type_traits/extent.hpp>
// 20.10.6 Relationships between types
#include <sprout/type_traits/is_same.hpp>
#include <sprout/type_traits/is_base_of.hpp>
#include <sprout/type_traits/is_convertible.hpp>
// 20.10.7.1 Const-volatile modifications
#include <sprout/type_traits/remove_const.hpp>
#include <sprout/type_traits/remove_volatile.hpp>
#include <sprout/type_traits/remove_cv.hpp>
#include <sprout/type_traits/add_const.hpp>
#include <sprout/type_traits/add_volatile.hpp>
#include <sprout/type_traits/add_cv.hpp>
// 20.10.7.2 Reference modifications
#include <sprout/type_traits/remove_reference.hpp>
#include <sprout/type_traits/add_lvalue_reference.hpp>
#include <sprout/type_traits/add_rvalue_reference.hpp>
// 20.10.7.3 Sign modifications
#include <sprout/type_traits/make_signed.hpp>
#include <sprout/type_traits/make_unsigned.hpp>
// 20.10.7.4 Array modifications
#include <sprout/type_traits/remove_extent.hpp>
#include <sprout/type_traits/remove_all_extents.hpp>
// 20.10.7.5 Pointer modifications
#include <sprout/type_traits/remove_pointer.hpp>
#include <sprout/type_traits/add_pointer.hpp>
// 20.10.7.6 Other transformations
#include <sprout/type_traits/aligned_storage.hpp>
#include <sprout/type_traits/aligned_union.hpp>
#include <sprout/type_traits/decay.hpp>
#include <sprout/type_traits/enable_if.hpp>
#include <sprout/type_traits/conditional.hpp>
#include <sprout/type_traits/common_type.hpp>
#include <sprout/type_traits/underlying_type.hpp>
#include <sprout/type_traits/result_of.hpp>
#include <sprout/type_traits/category.hpp>
#include <sprout/type_traits/composite_category.hpp>
#include <sprout/type_traits/property.hpp>
#include <sprout/type_traits/property_query.hpp>
#include <sprout/type_traits/relationship.hpp>
#include <sprout/type_traits/cv_modification.hpp>
#include <sprout/type_traits/ref_modification.hpp>
#include <sprout/type_traits/sign_modification.hpp>
#include <sprout/type_traits/array_modification.hpp>
#include <sprout/type_traits/pointer_modification.hpp>
#include <sprout/type_traits/transformation.hpp>
#endif // #ifndef SPROUT_TYPE_TRAITS_STD_TYPE_TRAITS_HPP

View file

@ -0,0 +1,30 @@
/*=============================================================================
Copyright (c) 2011-2015 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_TRANSFORMATION_HPP
#define SPROUT_TYPE_TRAITS_TRANSFORMATION_HPP
#include <sprout/config.hpp>
// 20.10.7.6 Other transformations
#include <sprout/type_traits/aligned_storage.hpp>
#include <sprout/type_traits/aligned_union.hpp>
#include <sprout/type_traits/decay.hpp>
#include <sprout/type_traits/enable_if.hpp>
#include <sprout/type_traits/conditional.hpp>
#include <sprout/type_traits/common_type.hpp>
#include <sprout/type_traits/underlying_type.hpp>
#include <sprout/type_traits/result_of.hpp>
#include <sprout/type_traits/identity.hpp>
#include <sprout/type_traits/common_decay.hpp>
#include <sprout/type_traits/arithmetic_promote.hpp>
#include <sprout/type_traits/float_promote.hpp>
#include <sprout/type_traits/complex_promote.hpp>
#include <sprout/type_traits/inherit_if_type.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#endif // #ifndef SPROUT_TYPE_TRAITS_TRANSFORMATION_HPP

View file

@ -8,9 +8,9 @@
#ifndef SPROUT_UTILITY_REINTER_CAST_HPP
#define SPROUT_UTILITY_REINTER_CAST_HPP
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/type_traits/integral_constant.hpp>
#include <sprout/type_traits/std_type_traits.hpp>
#include <sprout/type_traits/enabler_if.hpp>
#include <sprout/utility/forward.hpp>
@ -19,12 +19,12 @@ namespace sprout {
template<typename From, typename To>
struct is_same_reinterpret_cast
: public sprout::bool_constant<
(sprout::is_reference<To>::value
&& sprout::is_same<typename sprout::decay<From>::type, typename sprout::decay<To>::type>::value
&& sprout::is_convertible<From, To>::value
(std::is_reference<To>::value
&& std::is_same<typename std::decay<From>::type, typename std::decay<To>::type>::value
&& std::is_convertible<From, To>::value
)
|| ((sprout::is_integral<To>::type || sprout::is_enum<To>::type || sprout::is_pointer<To>::type)
&& sprout::is_same<typename sprout::decay<From>::type, To>::value
|| ((std::is_integral<To>::type || std::is_enum<To>::type || std::is_pointer<To>::type)
&& std::is_same<typename std::decay<From>::type, To>::value
)
>

View file

@ -15,7 +15,7 @@
#include <sprout/utility/swap.hpp>
#include <sprout/utility/forward.hpp>
#include <sprout/utility/move.hpp>
#include <sprout/type_traits/std_type_traits.hpp>
#include <sprout/type_traits/is_constructible.hpp>
#include <sprout/optional/in_place.hpp>
namespace sprout {

View file

@ -9,7 +9,7 @@
#define SPROUT_WEED_ATTR_CNV_RESULTS_MEM_PTR_HPP
#include <sprout/config.hpp>
#include <sprout/type_traits/std_type_traits.hpp>
#include <sprout/type_traits/result_of.hpp>
namespace sprout {
namespace weed {