Great, patches are Ok and thanks a lot again for working on this.
Please, keep an eye to any user code exercising the new bits in
For the mainline/4.7 version, you want to cast __pred to bool:
!bool(__pred(*__first)). Also, isn't clear to me why you have __local_len in
__find_if_not_n instead of just working on __len (and in any case please
prefer just __local_len as condition instead of the redundant __local_len !=
0; likewise in many other similar situations).
I was micro-optimizing, since the compiler might think __len is
modified in __pred if it doesn't inline enough. I've removed
__local_len, casted pred results to bool, and avoided !=0.
Also, very minor nit, you will be touching the libstdc++-v3 Changelog thus
no libstdc++-v3 prefixes in the ChangeLog entry.