This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of LEWG status.

2922. The *_constant<> templates do not make use of template<auto>

Section: 21.3.3 [meta.type.synop] Status: LEWG Submitter: United States Opened: 2017-02-03 Last modified: 2017-07-15

Priority: Not Prioritized

View other active issues in [meta.type.synop].

View all other issues in [meta.type.synop].

View all issues with LEWG status.

Discussion:

Addresses US 171

The *_constant<> templates (including the proposed addition, bool_constant<>) do not make use of the new template<auto> feature.

Proposed change: Add a constant<> (subject to bikeshedding) template which uses template<auto>.

Define integral_constant<> as using integral_constant<T, V> = constant<T(V)> or integral_constant<T, V> = constant<V>.

Either remove bool_constant, define it as using bool_constant = constant<bool(B)> or using bool_constant = constant<B>.

[2017-03-03, Kona, LEWG]

Straw polls:

Name:
constant3
numeric_constant8
static_constant1
scalar_constant7
integer_constant (Over LWG's dead body)1
auto_constant4
integral_c7
int_0
scalar_constant6
numeric_constant3
integral_c5

Accept P0377 with "scalar_constant" for C++17 to address LWG 2922 and US 171:

SF | F | N | A | SA

0 | 1 | 3 | 7 | 5

[2017-07 Toronto Thurs Issue Prioritization]

Status LEWG with P0377

Proposed resolution: