1
0
Fork 0
mirror of https://github.com/bolero-MURAKAMI/Sprout synced 2024-11-12 21:09:01 +00:00

fix for VC++

This commit is contained in:
bolero-MURAKAMI 2017-07-31 12:03:30 +09:00
parent 5905422433
commit 74d7368aa5
3 changed files with 23 additions and 15 deletions

View file

@ -30,7 +30,7 @@ namespace sprout {
static sprout::false_type test(...); static sprout::false_type test(...);
}; };
#if defined(_MSC_VER) && (_MSC_VER > 1900) #if defined(_MSC_VER) && (_MSC_VER > 1900)
template<typename T, typename Base_ = sprout::identity<decltype(sprout::detail::is_destructible_helper::test<T>(0))>::type> template<typename T, typename Base_ = typename sprout::identity<decltype(sprout::detail::is_destructible_helper::test<T>(0))>::type>
struct is_destructible_impl_0 struct is_destructible_impl_0
: public Base_ : public Base_
{}; {};

View file

@ -27,7 +27,7 @@ namespace sprout {
static sprout::false_type test(...); static sprout::false_type test(...);
}; };
#if defined(_MSC_VER) && (_MSC_VER > 1900) #if defined(_MSC_VER) && (_MSC_VER > 1900)
template<typename T, typename Base_ = sprout::identity<decltype(sprout::detail::is_nothrow_destructible_helper::test<T>(0))>::type> template<typename T, typename Base_ = typename sprout::identity<decltype(sprout::detail::is_nothrow_destructible_helper::test<T>(0))>::type>
struct is_nothrow_destructible_impl_0 struct is_nothrow_destructible_impl_0
: public Base_ : public Base_
{}; {};

View file

@ -32,44 +32,52 @@ namespace sprout {
struct result_of_memfun_ref_helper { struct result_of_memfun_ref_helper {
public: public:
template<typename F, typename T, typename... Args> template<typename F, typename T, typename... Args>
static sprout::identity<decltype((std::declval<T>().*std::declval<F>())(std::declval<Args>()...))> test(int); static sprout::identity<decltype((std::declval<T>().*std::declval<F>())(std::declval<Args>()...))> test(sprout::types::type_tuple<Args...>);
template<typename...> template<typename...>
static sprout::detail::nil_base test(...); static sprout::detail::nil_base test(...);
}; };
#if defined(_MSC_VER) && (_MSC_VER > 1900) #if defined(_MSC_VER) && (_MSC_VER > 1900)
template< template<
typename MemPtr, typename Arg, typename... Args, typename MemPtr, typename Arg, typename Args,
typename Base_ = sprout::identity<decltype(sprout::detail::result_of_memfun_ref_helper::test<MemPtr, Arg, Args...>(0))>::type typename Base_ = typename sprout::identity<decltype(sprout::detail::result_of_memfun_ref_helper::test<MemPtr, Arg>(Args()))>::type
> >
struct result_of_memfun_ref struct result_of_memfun_ref_impl
: public Base_ : public Base_
{}; {};
template<typename MemPtr, typename Arg, typename... Args>
struct result_of_memfun_ref
: public sprout::detail::result_of_memfun_ref_impl<MemPtr, Arg, sprout::types::type_tuple<Args...> >
{};
#else #else
template<typename MemPtr, typename Arg, typename... Args> template<typename MemPtr, typename Arg, typename... Args>
struct result_of_memfun_ref struct result_of_memfun_ref
: public sprout::identity<decltype(sprout::detail::result_of_memfun_ref_helper::test<MemPtr, Arg, Args...>(0))>::type : public sprout::identity<decltype(sprout::detail::result_of_memfun_ref_helper::test<MemPtr, Arg, Args...>(sprout::types::type_tuple<Args...>()))>::type
{}; {};
#endif #endif
struct result_of_memfun_deref_helper { struct result_of_memfun_deref_helper {
public: public:
template<typename F, typename T, typename... Args> template<typename F, typename T, typename... Args>
static sprout::identity<decltype(((*std::declval<T>()).*std::declval<F>())(std::declval<Args>()...))> test(int); static sprout::identity<decltype(((*std::declval<T>()).*std::declval<F>())(std::declval<Args>()...))> test(sprout::types::type_tuple<Args...>);
template<typename...> template<typename...>
static sprout::detail::nil_base test(...); static sprout::detail::nil_base test(...);
}; };
#if defined(_MSC_VER) && (_MSC_VER > 1900) #if defined(_MSC_VER) && (_MSC_VER > 1900)
template< template<
typename MemPtr, typename Arg, typename... Args, typename MemPtr, typename Arg, typename Args,
typename Base_ = sprout::identity<decltype(sprout::detail::result_of_memfun_deref_helper::test<MemPtr, Arg, Args...>(0))>::type typename Base_ = typename sprout::identity<decltype(sprout::detail::result_of_memfun_deref_helper::test<MemPtr, Arg>(Args()))>::type
> >
struct result_of_memfun_deref struct result_of_memfun_deref_impl
: public Base_ : public Base_
{}; {};
template<typename MemPtr, typename Arg, typename... Args>
struct result_of_memfun_deref
: public sprout::detail::result_of_memfun_deref_impl<MemPtr, Arg, sprout::types::type_tuple<Args...> >
{};
#else #else
template<typename MemPtr, typename Arg, typename... Args> template<typename MemPtr, typename Arg, typename... Args>
struct result_of_memfun_deref struct result_of_memfun_deref
: public sprout::identity<decltype(sprout::detail::result_of_memfun_deref_helper::test<MemPtr, Arg, Args...>(0))>::type : public sprout::identity<decltype(sprout::detail::result_of_memfun_deref_helper::test<MemPtr, Arg, Args...>(sprout::types::type_tuple<Args...>()))>::type
{}; {};
#endif #endif
@ -83,7 +91,7 @@ namespace sprout {
#if defined(_MSC_VER) && (_MSC_VER > 1900) #if defined(_MSC_VER) && (_MSC_VER > 1900)
template< template<
typename MemPtr, typename Arg, typename MemPtr, typename Arg,
typename Base_ = sprout::identity<decltype(sprout::detail::result_of_memobj_ref_helper::test<MemPtr, Arg>(0))>::type typename Base_ = typename sprout::identity<decltype(sprout::detail::result_of_memobj_ref_helper::test<MemPtr, Arg>(0))>::type
> >
struct result_of_memobj_ref struct result_of_memobj_ref
: public Base_ : public Base_
@ -105,7 +113,7 @@ namespace sprout {
#if defined(_MSC_VER) && (_MSC_VER > 1900) #if defined(_MSC_VER) && (_MSC_VER > 1900)
template< template<
typename MemPtr, typename Arg, typename MemPtr, typename Arg,
typename Base_ = sprout::identity<decltype(sprout::detail::result_of_memobj_deref_helper::test<MemPtr, Arg>(0))>::type typename Base_ = typename sprout::identity<decltype(sprout::detail::result_of_memobj_deref_helper::test<MemPtr, Arg>(0))>::type
> >
struct result_of_memobj_deref struct result_of_memobj_deref
: public Base_ : public Base_
@ -164,7 +172,7 @@ namespace sprout {
template<typename Functor, typename... Args> template<typename Functor, typename... Args>
struct result_of_other_base { struct result_of_other_base {
public: public:
typedef sprout::identity<decltype(sprout::detail::result_of_other_impl::test<Functor, Args...>(0))>::type type; typedef typename sprout::identity<decltype(sprout::detail::result_of_other_impl::test<Functor, Args...>(0))>::type type;
}; };
template<typename Functor, typename... Args> template<typename Functor, typename... Args>
struct result_of_other struct result_of_other