Movatterモバイル変換


[0]ホーム

URL:


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


1201. Are deleted and defaulted functions definitions?

Section:6.2  [basic.def]    Status:C++11    Submitter:Daniel Krügler    Date:2010-09-20

[Voted into the WP at the March, 2011 meeting.]

According to 6.3 [basic.def.odr] paragraph 2,

A declaration is adefinition unless it declares a functionwithout specifying the function's body (9.6 [dcl.fct.def]), itcontains theextern specifier (9.2.2 [dcl.stc]) or alinkage-specification25 (9.12 [dcl.link])and neither aninitializer nor afunction-body...

Because= delete and= default are not formsoffunction-body, this description does not cover defaultedand deleted functions, even though these declarations are elsewherereferred to as being definitions.

Proposed resolution (January, 2011):

Change the grammar in 9.6.1 [dcl.fct.def.general] paragraph 1as follows:




[8]ページ先頭

©2009-2026 Movatter.jp