Movatterモバイル変換


[0]ホーム

URL:


Issue 1491 - WG21 CWG Issues
Title
Move construction and rvalue reference members
Status
cd3
Section
11.4.5.3 [class.copy.ctor]
Submitter
Richard Smith

Created on2012-03-30.00:00:00 last changed145 months ago

Messages

msg4972 (view)
Date: 2014-03-03.00:00:00

Additional note, February, 2014:

This issue is resolved by the resolution ofissue 1402, which removed the problematicsentence.

msg3966 (view)
Date: 2022-02-18.07:47:23

According to 11.4.5.3 [class.copy.ctor] paragraph 11, the last bullet,a defaulted move constructor for a class is defined as deleted if

a non-static data member or direct or virtual base class with a typethat does not have a move constructor and is not trivially copyable.

This means that an example like

  struct S { S(); int &&r; } s{S()};

is ill-formed. This is probably not intended.

(Note that the February, 2012 proposed resolution forissue 1402 also makes this exampleill-formed, because the move constructor is not declared and thecopy constructor is defined as deleted because of the rvalue-referencemember.)

History
DateUserActionArgs
2014-03-03 00:00:00adminsetmessages: +msg4972
2014-03-03 00:00:00adminsetstatus: drafting -> cd3
2012-11-03 00:00:00adminsetstatus: open -> drafting
2012-03-30 00:00:00admincreate

[8]ページ先頭

©2009-2026 Movatter.jp