Skip to content

Commit

Permalink
Logic bug accidentally reveals msvc12 actually can pattern match this…
Browse files Browse the repository at this point in the history
… particular incantation
  • Loading branch information
K-ballo committed Aug 21, 2016
1 parent 2b7a4e4 commit bbb29a3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 36 deletions.
27 changes: 9 additions & 18 deletions hpx/parallel/algorithms/transform.hpp
Expand Up @@ -191,14 +191,11 @@ namespace hpx { namespace parallel { HPX_INLINE_NAMESPACE(v1)
is_execution_policy<ExPolicy>::value &&
hpx::traits::is_iterator<InIter>::value &&
hpx::traits::is_iterator<OutIter>::value &&
traits::is_projected<Proj, InIter>::value)
#if defined(HPX_MSVC) && HPX_MSVC <= 1800 // MSVC12 can't pattern match this
, HPX_CONCEPT_REQUIRES_(
traits::is_projected<Proj, InIter>::value),
HPX_CONCEPT_REQUIRES_(
traits::is_indirect_callable<
F, traits::projected<Proj, InIter>
>::value)
#endif
>
>::value)>
typename util::detail::algorithm_result<ExPolicy,
hpx::util::tagged_pair<tag::in(InIter), tag::out(OutIter)>
>::type
Expand Down Expand Up @@ -418,15 +415,12 @@ namespace hpx { namespace parallel { HPX_INLINE_NAMESPACE(v1)
hpx::traits::is_iterator<InIter2>::value &&
hpx::traits::is_iterator<OutIter>::value &&
traits::is_projected<Proj1, InIter1>::value &&
traits::is_projected<Proj2, InIter2>::value)
#if defined(HPX_MSVC) && HPX_MSVC <= 1800 // MSVC12 can't pattern match this
, HPX_CONCEPT_REQUIRES_(
traits::is_projected<Proj2, InIter2>::value),
HPX_CONCEPT_REQUIRES_(
traits::is_indirect_callable<
F, traits::projected<Proj1, InIter1>,
traits::projected<Proj2, InIter2>
>::value)
#endif
>
>::value)>
typename util::detail::algorithm_result<
ExPolicy,
hpx::util::tagged_tuple<
Expand Down Expand Up @@ -645,15 +639,12 @@ namespace hpx { namespace parallel { HPX_INLINE_NAMESPACE(v1)
hpx::traits::is_iterator<InIter2>::value &&
hpx::traits::is_iterator<OutIter>::value &&
traits::is_projected<Proj1, InIter1>::value &&
traits::is_projected<Proj2, InIter2>::value)
#if defined(HPX_MSVC) && HPX_MSVC <= 1800 // MSVC12 can't pattern match this
, HPX_CONCEPT_REQUIRES_(
traits::is_projected<Proj2, InIter2>::value),
HPX_CONCEPT_REQUIRES_(
traits::is_indirect_callable<
F, traits::projected<Proj1, InIter1>,
traits::projected<Proj2, InIter2>
>::value)
#endif
>
>::value)>
typename util::detail::algorithm_result<
ExPolicy,
hpx::util::tagged_tuple<
Expand Down
27 changes: 9 additions & 18 deletions hpx/parallel/container_algorithms/transform.hpp
Expand Up @@ -103,14 +103,11 @@ namespace hpx { namespace parallel { HPX_INLINE_NAMESPACE(v1)
is_execution_policy<ExPolicy>::value &&
traits::is_range<Rng>::value &&
hpx::traits::is_iterator<OutIter>::value &&
traits::is_projected_range<Proj, Rng>::value)
#if defined(HPX_MSVC) && HPX_MSVC <= 1800 // MSVC12 can't pattern match this
, HPX_CONCEPT_REQUIRES_(
traits::is_projected_range<Proj, Rng>::value),
HPX_CONCEPT_REQUIRES_(
traits::is_indirect_callable<
F, traits::projected_range<Proj, Rng>
>::value)
#endif
>
>::value)>
typename util::detail::algorithm_result<
ExPolicy,
hpx::util::tagged_pair<
Expand Down Expand Up @@ -224,15 +221,12 @@ namespace hpx { namespace parallel { HPX_INLINE_NAMESPACE(v1)
hpx::traits::is_iterator<InIter2>::value &&
hpx::traits::is_iterator<OutIter>::value &&
traits::is_projected_range<Proj1, Rng>::value &&
traits::is_projected<Proj2, InIter2>::value)
#if defined(HPX_MSVC) && HPX_MSVC <= 1800 // MSVC12 can't pattern match this
, HPX_CONCEPT_REQUIRES_(
traits::is_projected<Proj2, InIter2>::value),
HPX_CONCEPT_REQUIRES_(
traits::is_indirect_callable<
F, traits::projected_range<Proj1, Rng>,
traits::projected<Proj2, InIter2>
>::value)
#endif
>
>::value)>
typename util::detail::algorithm_result<
ExPolicy,
hpx::util::tagged_tuple<
Expand Down Expand Up @@ -349,15 +343,12 @@ namespace hpx { namespace parallel { HPX_INLINE_NAMESPACE(v1)
traits::is_range<Rng2>::value &&
hpx::traits::is_iterator<OutIter>::value &&
traits::is_projected_range<Proj1, Rng1>::value &&
traits::is_projected_range<Proj2, Rng2>::value)
#if defined(HPX_MSVC) && HPX_MSVC <= 1800 // MSVC12 can't pattern match this
, HPX_CONCEPT_REQUIRES_(
traits::is_projected_range<Proj2, Rng2>::value),
HPX_CONCEPT_REQUIRES_(
traits::is_indirect_callable<
F, traits::projected_range<Proj1, Rng1>,
traits::projected_range<Proj2, Rng2>
>::value)
#endif
>
>::value)>
typename util::detail::algorithm_result<
ExPolicy,
hpx::util::tagged_tuple<
Expand Down

0 comments on commit bbb29a3

Please sign in to comment.