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

2025-12-20


2379. Missing prohibition against constexpr in friend declaration

Section: 13.7.5  [temp.friend]     Status: CD5     Submitter: Richard Smith     Date: 2018-06-14

[Accepted as a DR at the February, 2019 meeting.]

According to 13.7.5 [temp.friend] paragraph 8,

When a friend declaration refers to a specialization of a function template, the function parameter declarations shall not include default arguments, nor shall the inline specifier be used in such a declaration.

Presumably this should also include the constexpr specifier.

Notes from the December, 2018 teleconference:

This should also cover the newly-added consteval specifier.

Proposed resolution (February, 2019):

Change 13.7.5 [temp.friend] paragraph 8 as follows:

When a friend declaration refers to a specialization of a function template, the function parameter declarations shall not include default arguments, nor shall the inline specifier inline, constexpr, or consteval specifiers be used in such a declaration.


Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant