workaround for ICC: decltype in template parameter

This commit is contained in:
bolero-MURAKAMI 2014-03-07 19:49:30 +09:00
parent 2d284a61c1
commit 86db277625
15 changed files with 41 additions and 48 deletions

View file

@ -47,4 +47,6 @@
# define SPROUT_NO_CXX11_TEMPLATE_ALIASES # define SPROUT_NO_CXX11_TEMPLATE_ALIASES
#endif #endif
#define SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES
#endif // #ifndef SPROUT_CONFIG_COMPILER_INTEL_HPP #endif // #ifndef SPROUT_CONFIG_COMPILER_INTEL_HPP

View file

@ -86,15 +86,6 @@
# define SPROUT_DEPRECATED # define SPROUT_DEPRECATED
#endif #endif
//
// SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES
//
#if defined(SPROUT_NO_CXX11_TEMPLATE_ALIASES)
# define SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES
#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)
# define SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES
#endif
// //
// SPROUT_USE_EXPLICIT_CONVERSION_OPERATORS // SPROUT_USE_EXPLICIT_CONVERSION_OPERATORS
// SPROUT_EXPLICIT_CONVERSION // SPROUT_EXPLICIT_CONVERSION

View file

@ -18,13 +18,13 @@ namespace sprout {
// index_n // index_n
// uindex_n // uindex_n
// //
#if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)
template<sprout::index_t I, std::size_t N> template<sprout::index_t I, std::size_t N>
using index_n = sprout::integer_n<sprout::index_t, I, N>; using index_n = sprout::integer_n<sprout::index_t, I, N>;
template<sprout::uindex_t I, std::size_t N> template<sprout::uindex_t I, std::size_t N>
using uindex_n = sprout::integer_n<sprout::uindex_t, I, N>; using uindex_n = sprout::integer_n<sprout::uindex_t, I, N>;
#else // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) #else // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)
template<sprout::index_t I, std::size_t N> template<sprout::index_t I, std::size_t N>
struct index_n struct index_n
: public sprout::integer_n<sprout::index_t, I, N>::type : public sprout::integer_n<sprout::index_t, I, N>::type
@ -36,7 +36,7 @@ namespace sprout {
: public sprout::integer_n<sprout::uindex_t, I, N>::type : public sprout::integer_n<sprout::uindex_t, I, N>::type
::template transfer<sprout::uindex_tuple<> > ::template transfer<sprout::uindex_tuple<> >
{}; {};
#endif // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) #endif // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)
} // namespace sprout } // namespace sprout
#endif // #ifndef SPROUT_INDEX_TUPLE_INDEX_N_HPP #endif // #ifndef SPROUT_INDEX_TUPLE_INDEX_N_HPP

View file

@ -18,13 +18,13 @@ namespace sprout {
// index_pack // index_pack
// uindex_pack // uindex_pack
// //
#if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)
template<typename... Ts> template<typename... Ts>
using index_pack = sprout::integer_pack<sprout::index_t, Ts...>; using index_pack = sprout::integer_pack<sprout::index_t, Ts...>;
template<typename... Ts> template<typename... Ts>
using uindex_pack = sprout::integer_pack<sprout::uindex_t, Ts...>; using uindex_pack = sprout::integer_pack<sprout::uindex_t, Ts...>;
#else // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) #else // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)
template<typename... Ts> template<typename... Ts>
struct index_pack struct index_pack
: public sprout::enable_make_indexes< : public sprout::enable_make_indexes<
@ -40,7 +40,7 @@ namespace sprout {
::template transfer<sprout::uindex_tuple<> > ::template transfer<sprout::uindex_tuple<> >
> >
{}; {};
#endif // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) #endif // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)
} // namespace sprout } // namespace sprout
#endif // #ifndef SPROUT_INDEX_TUPLE_INDEX_PACK_HPP #endif // #ifndef SPROUT_INDEX_TUPLE_INDEX_PACK_HPP

View file

@ -17,7 +17,7 @@ namespace sprout {
// index_range // index_range
// uindex_range // uindex_range
// //
#if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)
template< template<
sprout::index_t First, sprout::index_t Last, sprout::index_t First, sprout::index_t Last,
typename std::make_signed<sprout::index_t>::type Step = sprout::detail::integer_range_default_step<sprout::index_t, First, Last>::value typename std::make_signed<sprout::index_t>::type Step = sprout::detail::integer_range_default_step<sprout::index_t, First, Last>::value
@ -29,7 +29,7 @@ namespace sprout {
typename std::make_signed<sprout::uindex_t>::type Step = sprout::detail::integer_range_default_step<sprout::uindex_t, First, Last>::value typename std::make_signed<sprout::uindex_t>::type Step = sprout::detail::integer_range_default_step<sprout::uindex_t, First, Last>::value
> >
using uindex_range = sprout::integer_range<sprout::uindex_t, First, Last, Step>; using uindex_range = sprout::integer_range<sprout::uindex_t, First, Last, Step>;
#else // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) #else // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)
template< template<
sprout::index_t First, sprout::index_t Last, sprout::index_t First, sprout::index_t Last,
typename std::make_signed<sprout::index_t>::type Step = sprout::detail::integer_range_default_step<sprout::index_t, First, Last>::value typename std::make_signed<sprout::index_t>::type Step = sprout::detail::integer_range_default_step<sprout::index_t, First, Last>::value
@ -47,7 +47,7 @@ namespace sprout {
: public sprout::integer_range<sprout::uindex_t, First, Last, Step>::type : public sprout::integer_range<sprout::uindex_t, First, Last, Step>::type
::template transfer<sprout::uindex_tuple<> > ::template transfer<sprout::uindex_tuple<> >
{}; {};
#endif // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) #endif // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)
} // namespace sprout } // namespace sprout
#endif // #ifndef SPROUT_INDEX_TUPLE_INDEX_RANGE_HPP #endif // #ifndef SPROUT_INDEX_TUPLE_INDEX_RANGE_HPP

View file

@ -15,15 +15,15 @@ namespace sprout {
// //
// index_sequence_for // index_sequence_for
// //
#if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)
template<typename... Ts> template<typename... Ts>
using index_sequence_for = sprout::uindex_pack<Ts...>; using index_sequence_for = sprout::uindex_pack<Ts...>;
#else // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) #else // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)
template<typename... Ts> template<typename... Ts>
struct index_sequence_for struct index_sequence_for
: public sprout::uindex_pack<Ts...> : public sprout::uindex_pack<Ts...>
{}; {};
#endif // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) #endif // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)
} // namespace sprout } // namespace sprout
#endif // #ifndef SPROUT_INDEX_TUPLE_INDEX_SEQUENCE_FOR_HPP #endif // #ifndef SPROUT_INDEX_TUPLE_INDEX_SEQUENCE_FOR_HPP

View file

@ -17,13 +17,13 @@ namespace sprout {
// index_tuple // index_tuple
// uindex_tuple // uindex_tuple
// //
#if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)
template<sprout::index_t... Indexes> template<sprout::index_t... Indexes>
using index_tuple = sprout::integer_sequence<sprout::index_t, Indexes...>; using index_tuple = sprout::integer_sequence<sprout::index_t, Indexes...>;
template<sprout::uindex_t... Indexes> template<sprout::uindex_t... Indexes>
using uindex_tuple = sprout::integer_sequence<sprout::uindex_t, Indexes...>; using uindex_tuple = sprout::integer_sequence<sprout::uindex_t, Indexes...>;
#else // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) #else // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)
template<sprout::index_t... Indexes> template<sprout::index_t... Indexes>
struct index_tuple struct index_tuple
: public sprout::integer_sequence<sprout::index_t, Indexes...> : public sprout::integer_sequence<sprout::index_t, Indexes...>
@ -55,7 +55,7 @@ namespace sprout {
return type(); return type();
} }
}; };
#endif // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) #endif // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)
} // namespace sprout } // namespace sprout
#endif // #ifndef SPROUT_INDEX_TUPLE_INDEX_TUPLE_HPP #endif // #ifndef SPROUT_INDEX_TUPLE_INDEX_TUPLE_HPP

View file

@ -79,15 +79,15 @@ namespace sprout {
// //
// integer_range // integer_range
// //
#if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)
template<typename T, T I, std::size_t N> template<typename T, T I, std::size_t N>
using integer_n = typename sprout::detail::integer_n<T, I, N>::type; using integer_n = typename sprout::detail::integer_n<T, I, N>::type;
#else // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) #else // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)
template<typename T, T I, std::size_t N> template<typename T, T I, std::size_t N>
struct integer_n struct integer_n
: public sprout::detail::integer_n<T, I, N> : public sprout::detail::integer_n<T, I, N>
{}; {};
#endif // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) #endif // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)
} // namespace sprout } // namespace sprout
#endif // #ifndef SPROUT_INDEX_TUPLE_INTEGER_N_HPP #endif // #ifndef SPROUT_INDEX_TUPLE_INTEGER_N_HPP

View file

@ -16,15 +16,15 @@ namespace sprout {
// //
// integer_pack // integer_pack
// //
#if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)
template<typename T, typename... Ts> template<typename T, typename... Ts>
using integer_pack = sprout::make_integer_sequence<T, sprout::detail::sizeof_pack<Ts...>::value>; using integer_pack = sprout::make_integer_sequence<T, sprout::detail::sizeof_pack<Ts...>::value>;
#else // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) #else // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)
template<typename T, typename... Ts> template<typename T, typename... Ts>
struct integer_pack struct integer_pack
: public sprout::make_integer_sequence<T, sizeof...(Ts)> : public sprout::make_integer_sequence<T, sizeof...(Ts)>
{}; {};
#endif // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) #endif // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)
} // namespace sprout } // namespace sprout
#endif // #ifndef SPROUT_INDEX_TUPLE_INTEGER_PACK_HPP #endif // #ifndef SPROUT_INDEX_TUPLE_INTEGER_PACK_HPP

View file

@ -104,13 +104,13 @@ namespace sprout {
// //
// integer_range // integer_range
// //
#if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)
template< template<
typename T, T First, T Last, typename T, T First, T Last,
typename std::make_signed<T>::type Step = sprout::detail::integer_range_default_step<T, First, Last>::value typename std::make_signed<T>::type Step = sprout::detail::integer_range_default_step<T, First, Last>::value
> >
using integer_range = typename sprout::detail::integer_range<T, First, Last, Step>::type; using integer_range = typename sprout::detail::integer_range<T, First, Last, Step>::type;
#else // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) #else // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)
template< template<
typename T, T First, T Last, typename T, T First, T Last,
typename std::make_signed<T>::type Step = sprout::detail::integer_range_default_step<T, First, Last>::value typename std::make_signed<T>::type Step = sprout::detail::integer_range_default_step<T, First, Last>::value
@ -118,7 +118,7 @@ namespace sprout {
struct integer_range struct integer_range
: public sprout::detail::integer_range<T, First, Last, Step> : public sprout::detail::integer_range<T, First, Last, Step>
{}; {};
#endif // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) #endif // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)
} // namespace sprout } // namespace sprout
#endif // #ifndef SPROUT_INDEX_TUPLE_INTEGER_RANGE_HPP #endif // #ifndef SPROUT_INDEX_TUPLE_INTEGER_RANGE_HPP

View file

@ -16,15 +16,15 @@ namespace sprout {
// //
// make_index_sequence // make_index_sequence
// //
#if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)
template<sprout::uindex_t N> template<sprout::uindex_t N>
using make_index_sequence = sprout::make_uindex_tuple<N>; using make_index_sequence = sprout::make_uindex_tuple<N>;
#else // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) #else // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)
template<sprout::uindex_t N> template<sprout::uindex_t N>
struct make_index_sequence struct make_index_sequence
: public sprout::make_uindex_tuple<N> : public sprout::make_uindex_tuple<N>
{}; {};
#endif // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) #endif // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)
} // namespace sprout } // namespace sprout
#endif // #ifndef SPROUT_INDEX_TUPLE_MAKE_INDEX_SEQUENCE_HPP #endif // #ifndef SPROUT_INDEX_TUPLE_MAKE_INDEX_SEQUENCE_HPP

View file

@ -18,13 +18,13 @@ namespace sprout {
// make_index_tuple // make_index_tuple
// make_uindex_tuple // make_uindex_tuple
// //
#if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)
template<sprout::index_t N> template<sprout::index_t N>
using make_index_tuple = sprout::make_integer_sequence<sprout::index_t, N>; using make_index_tuple = sprout::make_integer_sequence<sprout::index_t, N>;
template<sprout::uindex_t N> template<sprout::uindex_t N>
using make_uindex_tuple = sprout::make_integer_sequence<sprout::uindex_t, N>; using make_uindex_tuple = sprout::make_integer_sequence<sprout::uindex_t, N>;
#else // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) #else // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)
template<sprout::index_t N> template<sprout::index_t N>
struct make_index_tuple struct make_index_tuple
: public sprout::enable_make_indexes< : public sprout::enable_make_indexes<
@ -40,7 +40,7 @@ namespace sprout {
::template transfer<sprout::uindex_tuple<> >::type ::template transfer<sprout::uindex_tuple<> >::type
> >
{}; {};
#endif // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) #endif // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)
} // namespace sprout } // namespace sprout
#endif // #ifndef SPROUT_INDEX_TUPLE_MAKE_INDEX_TUPLE_HPP #endif // #ifndef SPROUT_INDEX_TUPLE_MAKE_INDEX_TUPLE_HPP

View file

@ -15,15 +15,15 @@ namespace sprout {
// //
// make_integer_sequence // make_integer_sequence
// //
#if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)
template<typename T, T N> template<typename T, T N>
using make_integer_sequence = sprout::integer_range<T, 0, N>; using make_integer_sequence = sprout::integer_range<T, 0, N>;
#else // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) #else // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)
template<typename T, T N> template<typename T, T N>
struct make_integer_sequence struct make_integer_sequence
: public sprout::integer_range<T, 0, N> : public sprout::integer_range<T, 0, N>
{}; {};
#endif // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES) #endif // #if SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)
} // namespace sprout } // namespace sprout
#endif // #ifndef SPROUT_INDEX_TUPLE_MAKE_INTEGER_SEQUENCE_HPP #endif // #ifndef SPROUT_INDEX_TUPLE_MAKE_INTEGER_SEQUENCE_HPP

View file

@ -38,7 +38,7 @@ namespace std {
typedef typename sprout::pack_element_c<I, T, Is...>::type type; typedef typename sprout::pack_element_c<I, T, Is...>::type type;
}; };
#if !(SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)) #if !(SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES))
// //
// tuple_size // tuple_size
// //
@ -68,7 +68,7 @@ namespace std {
struct tuple_element<I, sprout::uindex_tuple<Indexes...> > struct tuple_element<I, sprout::uindex_tuple<Indexes...> >
: public std::tuple_element<I, sprout::integer_sequence<sprout::uindex_t, Indexes...> > : public std::tuple_element<I, sprout::integer_sequence<sprout::uindex_t, Indexes...> >
{}; {};
#endif // #if !(SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)) #endif // #if !(SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES))
#if defined(__clang__) #if defined(__clang__)
# pragma clang diagnostic pop # pragma clang diagnostic pop
@ -87,7 +87,7 @@ namespace sprout {
return type(); return type();
} }
#if !(SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)) #if !(SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES))
// //
// tuple_get // tuple_get
// //
@ -109,7 +109,7 @@ namespace sprout {
typedef typename std::tuple_element<I, sprout::uindex_tuple<Indexes...> >::type type; typedef typename std::tuple_element<I, sprout::uindex_tuple<Indexes...> >::type type;
return type(); return type();
} }
#endif // #if !(SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES)) #endif // #if !(SPROUT_USE_TEMPLATE_ALIASES && !defined(SPROUT_WORKAROUND_NO_TEMPLATE_ARGUMENT_DEDUCTION_WITH_ALIASES))
} // namespace sprout } // namespace sprout
#endif // #ifndef SPROUT_INDEX_TUPLE_TUPLE_HPP #endif // #ifndef SPROUT_INDEX_TUPLE_TUPLE_HPP

View file

@ -50,7 +50,7 @@
// //
#if defined(_MSC_VER) #if defined(_MSC_VER)
#define SPROUT_HAS_XXX_VALUE_DEF_IMPL(NAME, VALUE, NUM) \ #define SPROUT_HAS_XXX_VALUE_DEF_IMPL(NAME, VALUE, NUM) \
template<typename T, decltype(&T::VALUE) = &T::VALUE> \ template<typename T, typename sprout::identity<decltype(&T::VALUE)>::type = &T::VALUE> \
sprout::true_type SPROUT_PP_CAT(SPROUT_PP_CAT(SPROUT_PP_CAT(sprout_has_xxx_impl_check_value_, VALUE), NAME), NUM)(int); \ sprout::true_type SPROUT_PP_CAT(SPROUT_PP_CAT(SPROUT_PP_CAT(sprout_has_xxx_impl_check_value_, VALUE), NAME), NUM)(int); \
template<typename T> \ template<typename T> \
sprout::false_type SPROUT_PP_CAT(SPROUT_PP_CAT(SPROUT_PP_CAT(sprout_has_xxx_impl_check_value_, VALUE), NAME), NUM)(long); \ sprout::false_type SPROUT_PP_CAT(SPROUT_PP_CAT(SPROUT_PP_CAT(sprout_has_xxx_impl_check_value_, VALUE), NAME), NUM)(long); \
@ -60,7 +60,7 @@
{} {}
#else #else
#define SPROUT_HAS_XXX_VALUE_DEF_IMPL(NAME, VALUE, NUM) \ #define SPROUT_HAS_XXX_VALUE_DEF_IMPL(NAME, VALUE, NUM) \
template<typename T, decltype(&T::VALUE) = &T::VALUE> \ template<typename T, typename sprout::identity<decltype(&T::VALUE)>::type = &T::VALUE> \
sprout::true_type SPROUT_PP_CAT(SPROUT_PP_CAT(SPROUT_PP_CAT(sprout_has_xxx_impl_check_value_, VALUE), NAME), NUM)(int); \ sprout::true_type SPROUT_PP_CAT(SPROUT_PP_CAT(SPROUT_PP_CAT(sprout_has_xxx_impl_check_value_, VALUE), NAME), NUM)(int); \
template<typename T> \ template<typename T> \
sprout::false_type SPROUT_PP_CAT(SPROUT_PP_CAT(SPROUT_PP_CAT(sprout_has_xxx_impl_check_value_, VALUE), NAME), NUM)(long); \ sprout::false_type SPROUT_PP_CAT(SPROUT_PP_CAT(SPROUT_PP_CAT(sprout_has_xxx_impl_check_value_, VALUE), NAME), NUM)(long); \