Note: This paper explores potential future standardization directions and alternatives. It does not discuss or propose to amend the C++14 Committee Draft paper whose ballot is currently in progress.
A new WG21 paper is available. A copy is linked below, and the paper will also appear in the next normal WG21 mailing. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.
Document number: N3699
Date: 2013-05-27
A proposal to add a generalized callable negator
by Tomasz Kamiński
Excerpt:
The standard negators
not1andnot2accept only unary and binary functors that defineargument_typeorfirst_argument_typeandsecond_argument_typerespectively, which make them unusable with results of standard library functions such asbindandmem_fn. Furthermore, with relation to N3421, they cannot be used with new operator functor specializations.This proposal addresses the problem by introducing a template function
not_fnthat returns complement of arbitrary predicate.

Add a Comment
Comments are closed.