Title
User-specialized nothrow type traits
Status
nad
Section
[meta.unary.prop]
Submitter
Alisdair Meredith

Created on 2009-10-07.00:00:00 last changed 163 months ago

Messages

Date: 2010-10-21.18:28:33

[ This may require a new Comments column ]

has_nothrow_default_constructor
has_nothrow_copy_constructor
has_nothrow_assign
Date: 2010-10-21.18:28:33

Proposed resolution:

Add the following comment:

user specialization permitted to derive from std::true_type when the operation is known not to throw.

to the following traits in [meta.unary.prop] Table 43 Type property predicates.

Date: 2010-10-21.18:28:33

Rationale:

We believe the solution offered by N3050 is superior.

Date: 2010-10-21.18:28:33

[ 2010 Pittsburgh: Moved to NAD, rationale added below. ]

Date: 2010-10-21.18:28:33

[ 2009-10 Santa Cruz: ]

Moved to Open. Definitely need to give the users the ability to ensure that the traits give the right answers. Unsure we want to give them the ability to say this in more than one way. Believes the noexcept proposal already gives this.

Date: 2009-10-07.00:00:00

According to p1 [meta.type.synop]:

The behavior of a program that adds specializations for any of the class templates defined in this subclause is undefined unless otherwise specified.

I believe we should 'otherwise specify' for the nothrow traits, are these are exactly the use cases where the end user actually has more information than the compiler.

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg1235
2010-10-21 18:28:33adminsetmessages: + msg1234
2010-10-21 18:28:33adminsetmessages: + msg1233
2010-10-21 18:28:33adminsetmessages: + msg1232
2010-10-21 18:28:33adminsetmessages: + msg1231
2009-10-07 00:00:00admincreate