A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.github.io/CWG/issues/1712.html below:

CWG Issue 1712

This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 117a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2025-04-13

1712. constexpr variable template declarationsSection: 9.2.6  [dcl.constexpr]     Status: CD4     Submitter: Richard Smith     Date: 2013-07-08

[Moved to DR at the November, 2014 meeting.]

According to 9.2.6 [dcl.constexpr] paragraph 1,

If any declaration of a function, function template, or variable template has a constexpr specifier, then all its declarations shall contain the constexpr specifier.

This requirement does not make sense applied to variable templates. The constexpr specifier requires that there be an initializer, and a variable template declaration with an initializer is a definition, so there cannot be more than one declaration of a variable template with the constexpr specifier.

Proposed resolution (February, 2014):

Change 9.2.6 [dcl.constexpr] paragraph 1 as follows:

...If any declaration of a function , or function template , or variable template has a constexpr specifier, then all its declarations shall contain the constexpr specifier. [Note:...

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4