Movatterモバイル変換


[0]ホーム

URL:



This page is a snapshot from the LWG issues list, see theLibrary Active Issues List for more information and the meaning ofC++17 status.

2773. Makingstd::ignore constexpr

Section: 22.4.1[tuple.general]Status:C++17Submitter: Vincent ReverdyOpened: 2016-09-10Last modified: 2017-07-30

Priority:0

View all otherissues in [tuple.general].

View all issues withC++17 status.

Discussion:

Currentlystd::ignore is not specifiedconstexpr according to the C++ draft N4606 in the paragraph 22.4.1[tuple.general]. It prevents some use inconstexpr context: for example declaring aconstexpr variable equals to the result of a function to whichstd::ignore has been passed as a parameter:

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

If there is no fundamental reason preventingstd::ignore to beconstexpr, then we propose to declare it asconstexpr instead of asconst.

[Issues processing Telecon 2016-10-7]

P0; set to Tentatively Ready

Proposed resolution:

This wording is relative to N4606.

  1. Modify 22.4.1[tuple.general] as indicated:

    // 20.5.2.4, tuple creation functions:constconstexprunspecified ignore;

[8]ページ先頭

©2009-2026 Movatter.jp