[libcxx-commits] [PATCH] D60537: [pstl] Do not inject execution policies into namespace ::pstl in the tests
Mikhail Dvorskiy via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Apr 12 06:42:33 PDT 2019
MikeDvorskiy added a comment.
> we should have a way to customize the namespace in which pstl injects the algorithms
Actually, pstl the algorithms are defined in "std" namespace.
pstl injects just execution policy into "std".
I would like to pay your attention for changing like this in the tests
> std::for_each_n(std::execution::seq, expected_first, n, Flip<T>(1));
Where a passed execution specifies an overloaded(by a policy type) implementation of std::for_each
and now the code is not correct in general I guess, because the test engine passes __pstl::execution::seg etc policies.
So, just for the test I suggest
std::for_each_n(__PSTL_POLICY_NAMESPACE::execution::seq, expected_first, n, Flip<T>(1));
to specify a proper overload in case of standalone PSTL version and there is a standard PSTL from a standard library delivered with a compiler.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60537/new/
https://reviews.llvm.org/D60537
More information about the libcxx-commits
mailing list