From 1cfea12064c5d671cd37d72d90fe37da66b9ea7b Mon Sep 17 00:00:00 2001 From: bolero-MURAKAMI Date: Fri, 21 Feb 2014 23:16:23 +0900 Subject: [PATCH] fix for ICC: decltype in base class --- sprout/config/compiler/intel.hpp | 8 ++++---- sprout/container/weak_rebind_size.hpp | 3 ++- sprout/generator/generator_access_traits.hpp | 4 ++-- sprout/type_traits/has_xxx.hpp | 7 ++++--- sprout/type_traits/is_convert_constructible.hpp | 2 +- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/sprout/config/compiler/intel.hpp b/sprout/config/compiler/intel.hpp index cddaf280..6bcd3b54 100644 --- a/sprout/config/compiler/intel.hpp +++ b/sprout/config/compiler/intel.hpp @@ -1,9 +1,9 @@ /*============================================================================= - Copyright (c) 2011-2014 Bolero MURAKAMI - https://github.com/bolero-MURAKAMI/Sprout + Copyright (c) 2011-2014 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) + 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_CONFIG_COMPILER_INTEL_HPP #define SPROUT_CONFIG_COMPILER_INTEL_HPP diff --git a/sprout/container/weak_rebind_size.hpp b/sprout/container/weak_rebind_size.hpp index 352f2e5e..d9b4137b 100644 --- a/sprout/container/weak_rebind_size.hpp +++ b/sprout/container/weak_rebind_size.hpp @@ -11,6 +11,7 @@ #include #include #include +#include #include namespace sprout { @@ -31,7 +32,7 @@ namespace sprout { #else template struct has_rebind_size - : public decltype(sprout::containers::detail::sprout_has_xxx_impl_check_template_rebind_size(0)) + : public sprout::identity(0))>::type {}; #endif } // namespace detail diff --git a/sprout/generator/generator_access_traits.hpp b/sprout/generator/generator_access_traits.hpp index 8feb06db..c98bf9f6 100644 --- a/sprout/generator/generator_access_traits.hpp +++ b/sprout/generator/generator_access_traits.hpp @@ -35,7 +35,7 @@ namespace sprout { #else template struct has_mem_generated_value - : public decltype(sprout::generators::detail::has_mem_generated_value_test::test(0)) + : public sprout::identity::test(0))>::type {}; #endif @@ -110,7 +110,7 @@ namespace sprout { #else template struct has_mem_next_generator - : public decltype(sprout::generators::detail::has_mem_next_generator_test::test(0)) + : public sprout::identity::test(0))>::type {}; #endif diff --git a/sprout/type_traits/has_xxx.hpp b/sprout/type_traits/has_xxx.hpp index 92953786..7988646f 100644 --- a/sprout/type_traits/has_xxx.hpp +++ b/sprout/type_traits/has_xxx.hpp @@ -11,6 +11,7 @@ #include #include #include +#include #include // @@ -35,7 +36,7 @@ sprout::false_type SPROUT_PP_CAT(SPROUT_PP_CAT(SPROUT_PP_CAT(sprout_has_xxx_impl_check_type_, TYPE), NAME), NUM)(long); \ template \ struct NAME \ - : public decltype(SPROUT_PP_CAT(SPROUT_PP_CAT(SPROUT_PP_CAT(sprout_has_xxx_impl_check_type_, TYPE), NAME), NUM)(0)) \ + : public sprout::identity(0))>::type \ {} #endif #define SPROUT_HAS_XXX_TYPE_DEF(NAME, TYPE) \ @@ -65,7 +66,7 @@ sprout::false_type SPROUT_PP_CAT(SPROUT_PP_CAT(SPROUT_PP_CAT(sprout_has_xxx_impl_check_value_, VALUE), NAME), NUM)(long); \ template \ struct NAME \ - : public decltype(SPROUT_PP_CAT(SPROUT_PP_CAT(SPROUT_PP_CAT(sprout_has_xxx_impl_check_value_, VALUE), NAME), NUM)(0)) \ + : public sprout::identity(0))>::type \ {} #endif #define SPROUT_HAS_XXX_VALUE_DEF(NAME, VALUE) \ @@ -95,7 +96,7 @@ sprout::false_type SPROUT_PP_CAT(SPROUT_PP_CAT(SPROUT_PP_CAT(sprout_has_xxx_impl_check_type_, TEMPLATE), NAME), NUM)(long); \ template \ struct NAME \ - : public decltype(SPROUT_PP_CAT(SPROUT_PP_CAT(SPROUT_PP_CAT(sprout_has_xxx_impl_check_type_, TEMPLATE), NAME), NUM)(0)) \ + : public sprout::identity(0))>::type \ {} #endif #define SPROUT_HAS_XXX_TEMPLATE_DEF(NAME, TEMPLATE) \ diff --git a/sprout/type_traits/is_convert_constructible.hpp b/sprout/type_traits/is_convert_constructible.hpp index 97906dc7..17735360 100644 --- a/sprout/type_traits/is_convert_constructible.hpp +++ b/sprout/type_traits/is_convert_constructible.hpp @@ -27,7 +27,7 @@ namespace sprout { } // namespace detail template struct is_convert_constructible - : public decltype(sprout::detail::is_convert_constructible_test::test(std::declval())) + : public sprout::identity::test(std::declval()))>::type {}; #if SPROUT_USE_TEMPLATE_ALIASES