Title
Making std::ignore constexpr
Status
c++17
Section
[tuple.general]
Submitter
Vincent Reverdy

Created on 2016-09-10.00:00:00 last changed 81 months ago

Messages

Date: 2016-10-08.04:58:13

Proposed resolution:

This wording is relative to N4606.

  1. Modify [tuple.general] as indicated:

    // 20.5.2.4, tuple creation functions:
    constconstexpr unspecified ignore;
    
Date: 2017-02-02.00:41:18

[ Issues processing Telecon 2016-10-7 ]

P0; set to Tentatively Ready

Date: 2016-09-10.00:00:00

Currently std::ignore is not specified constexpr according to the C++ draft N4606 in the paragraph [tuple.general]. It prevents some use in constexpr context: for example declaring a constexpr variable equals to the result of a function to which std::ignore has been passed as a parameter:

constexpr int i = f(std::ignore); // Won't compile

If there is no fundamental reason preventing std::ignore to be constexpr, then we propose to declare it as constexpr instead of as const.

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-10-08 04:58:13adminsetmessages: + msg8544
2016-10-08 04:58:13adminsetstatus: new -> ready
2016-09-27 19:07:47adminsetmessages: + msg8524
2016-09-10 00:00:00admincreate