Skip to content

Commit

Permalink
Remove ICC workaround that now produces failures
Browse files Browse the repository at this point in the history
Also document that 18.0.5 is required to not get internal compiler
errors

Signed-off-by: Matthias Kretz <kretz@kde.org>
  • Loading branch information
mattkretz committed Nov 19, 2018
1 parent b32ae2b commit ee2809c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -90,7 +90,7 @@ C++11 Compiler:
* GCC >= 4.8.1
* clang >= 3.4
* ICC >= 18
* ICC >= 18.0.5
* Visual Studio 2015 (64-bit target)
Expand Down
16 changes: 3 additions & 13 deletions Vc/traits/is_functor_argument_immutable.h
Expand Up @@ -46,17 +46,7 @@ struct dummy {};
// generate a true_type for template operator() members in F that are callable with a
// 'const A &' argument even if the template parameter to operator() is fixed to 'A'.
template <
typename F, typename A
#ifdef Vc_ICC
// this ensures that F is a generic lambda. We can be pretty sure that noone wrote a
// lambda with Vc::Traits::is_functor_argument_immutable_impl::dummy parameter
// type. In theory, this is not needed because the return type fails with a
// substitution failure in that case. Only ICC generates and error instead of doing
// SFINAE.
,
typename = decltype(std::declval<F &>()(std::declval<dummy &>()))
#endif
,
typename F, typename A,
#ifdef Vc_MSVC
// MSVC fails if the template keyword is used to *correctly* tell the compiler that <A> is
// an explicit template instantiation of operator()
Expand Down Expand Up @@ -85,12 +75,12 @@ template <typename F, typename A, bool = std::is_function<F>::value>
struct is_functor_argument_immutable;
template <typename F, typename A>
struct is_functor_argument_immutable<F, A, false>
: public decltype(is_functor_argument_immutable_impl::test2<
: decltype(is_functor_argument_immutable_impl::test2<
typename std::remove_reference<F>::type, A>(int())) {
};
template <typename F, typename A>
struct is_functor_argument_immutable<F, A, true>
: public decltype(is_functor_argument_immutable_impl::test3(std::declval<F>())) {
: decltype(is_functor_argument_immutable_impl::test3(std::declval<F>())) {
};

} // namespace Traits
Expand Down

0 comments on commit ee2809c

Please sign in to comment.