Title
Type traits must not be final
Status
c++17
Section
[meta.rqmts]
Submitter
Jonathan Wakely

Created on 2015-07-03.00:00:00 last changed 89 months ago

Messages

Date: 2016-08-05.03:58:49

Proposed resolution:

This wording is relative to N4606.

  1. Add a new paragraph add the end of [derivation] as indicated:

    -?- All types specified in the C++ standard library shall be non-final types unless otherwise specified.

Date: 2016-08-05.03:58:49

[ 2016-08 - Chicago ]

Thurs PM: Moved to Tentatively Ready

Date: 2016-08-04.00:00:00

[ 2016-08-04 Chicago LWG ]

LWG discusses and expresses preference for a more general, Library-wide, resolution. Walter and Nevin provide a new Proposed Resolution consistent with such guidance.

Date: 2016-08-03.00:00:00

[ 2016-08-03 Chicago LWG ]

Walter, Nevin, and Jason provide initial Proposed Resolution.

Previous resolution [SUPERSEDED]:

This wording is relative to N4606.

  1. Change [meta.rqmts] as indicated:

    -1- A UnaryTypeTrait describes a property of a type. It shall be a non-final class template […]

    -2- A BinaryTypeTrait describes a relationship between two types. It shall be a non-final class template […]

    -3- A TransformationTrait modifies a property of a type. It shall be a non-final class template […]

Date: 2015-07-03.00:00:00

We should make it clear that all standard UnaryTypeTraits, BinaryTypeTraits and TransformationTraits are not final.

Otherwise it is not safe to use them as arguments to a template like this:

template<typename C1, typename C2>
struct conjunction
  : conditional_t<C1::value, C2, C1>
{ };
History
Date User Action Args
2017-07-30 20:15:43adminsetstatus: wp -> c++17
2016-11-14 03:59:28adminsetstatus: pending -> wp
2016-11-14 03:55:22adminsetstatus: ready -> pending
2016-08-05 03:58:49adminsetmessages: + msg8420
2016-08-05 03:58:49adminsetstatus: new -> ready
2016-08-04 20:52:54adminsetmessages: + msg8407
2016-08-04 18:40:03adminsetmessages: + msg8400
2016-08-04 18:40:03adminsetmessages: + msg8399
2015-07-03 00:00:00admincreate