Created on 2008-02-08.00:00:00 last changed 170 months ago
Proposed resolution:
Add a new sentence to the end of paragraphs 2 and 4 of [func.bind.bind]:
-2- Returns: A forwarding call wrapper g with a weak result type (20.6.2). The effect of g(u1, u2, ..., uM) shall be INVOKE(f, v1, v2, ..., vN, Callable<F cv,V1, V2, ..., VN>::result_type), where cv represents the cv-qualifiers of g and the values and types of the bound arguments v1, v2, ..., vN are determined as specified below. The copy constructor and move constructor of the forwarding call wrapper shall throw an exception if and only if the corresponding constructor of F or any of the types in BoundArgs... throw an exception.
...
-5- Returns: A forwarding call wrapper g with a nested type result_type defined as a synonym for R. The effect of g(u1, u2, ..., uM) shall be INVOKE(f, v1, v2, ..., vN, R), where the values and types of the bound arguments v1, v2, ..., vN are determined as specified below. The copy constructor and move constructor of the forwarding call wrapper shall throw an exception if and only if the corresponding constructor of F or any of the types in BoundArgs... throw an exception.
Rationale:
This issue is solved as proposed by 817.
[ 2010-02-11 Moved from Ready to Tentatively NAD Editorial, rationale added below. ]
[ 2009-10 Santa Cruz: ]
Move to Ready. Decoupling from issue 817.
[ 2009-07 Frankfurt: ]
Related to 817 (see below). Leave Open.
[ Post Summit, Anthony provided wording. ]
[ San Francisco: ]
Howard to provide wording.
[ Howard adds: ]
tuple construction should probably have a similar guarantee.
Library Issue 527 notes that bind(f, t1, ..., tN) should be nofail when f, t1, ..., tN have nofail copy ctors.
However, no guarantees are provided for the copy ctor of the functor returned by bind(). (It's guaranteed to have a copy ctor, which can throw implementation-defined exceptions: bind() returns a forwarding call wrapper, TR1 3.6.3/2. A forwarding call wrapper is a call wrapper, TR1 3.3/4. Every call wrapper shall be CopyConstructible, TR1 3.3/4. Everything without an exception-specification may throw implementation-defined exceptions unless otherwise specified, C++03 17.4.4.8/3.)
Should the nofail guarantee requested by Library Issue 527 be extended to cover both calling bind() and copying the returned functor?
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-11-19 19:04:45 | admin | set | status: nad editorial -> resolved |
2010-10-21 18:28:33 | admin | set | messages: + msg3895 |
2010-10-21 18:28:33 | admin | set | messages: + msg3894 |
2010-10-21 18:28:33 | admin | set | messages: + msg3893 |
2010-10-21 18:28:33 | admin | set | messages: + msg3892 |
2010-10-21 18:28:33 | admin | set | messages: + msg3891 |
2010-10-21 18:28:33 | admin | set | messages: + msg3890 |
2010-10-21 18:28:33 | admin | set | messages: + msg3889 |
2010-10-21 18:28:33 | admin | set | messages: + msg3888 |
2010-10-21 18:28:33 | admin | set | messages: + msg3887 |
2008-02-08 00:00:00 | admin | create |