[PATCH] D33997: Implement the non-execution policy versions of `reduce` and `transform_reduce` for C++17

Marshall Clow via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 8 19:47:16 PDT 2017


mclow.lists added a comment.

> Should the non-parallel implementation of reduce static_assert or SFINAE away when these requirements are not met?

That may be desirable, but that's not what the standard says.
There's nothing there about "shall not participate in overload resolution".

//Requires:// in the standard is a requirement on the caller.
Failure to satisfy those requirements is UB - and it can compile, not compile, explode at runtime, give the right answer, whatever.

(Look at `copy`, say)


https://reviews.llvm.org/D33997





More information about the cfe-commits mailing list