29 #ifndef VC_TRAITS_IS_FUNCTOR_ARGUMENT_IMMUTABLE_H_
30 #define VC_TRAITS_IS_FUNCTOR_ARGUMENT_IMMUTABLE_H_
32 namespace Vc_VERSIONED_NAMESPACE
36 namespace is_functor_argument_immutable_impl
39 template <
typename F,
typename A>
struct workaround_edg
41 typedef decltype(&F::template
operator()<A>) type;
44 template <typename F, typename A,
45 typename MemberPtr = typename workaround_edg<F, A>::type,
46 typename = decltype((
std::declval<F &>().*
47 (
std::declval<MemberPtr>()))(
std::declval<const A &>()))>
48 std::true_type test(
int);
49 template <typename F, typename A>
std::false_type test(...);
52 template <typename F, typename A>
53 using is_functor_argument_immutable =
54 decltype(is_functor_argument_immutable_impl::test<F, A>(1));
59 #endif // VC_TRAITS_IS_FUNCTOR_ARGUMENT_IMMUTABLE_H_