Skip to content

Commit c68a395

Browse files
committed
[I.27] fix move ctor in the pimpl example (closes #1471)
1 parent df94731 commit c68a395

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

CppCoreGuidelines.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2212,7 +2212,7 @@ interface (widget.h)
22122212
void draw(); // public API that will be forwarded to the implementation
22132213
widget(int); // defined in the implementation file
22142214
~widget(); // defined in the implementation file, where impl is a complete type
2215-
widget(widget&&) = default;
2215+
widget(widget&&); // defined in the implementation file
22162216
widget(const widget&) = delete;
22172217
widget& operator=(widget&&); // defined in the implementation file
22182218
widget& operator=(const widget&) = delete;
@@ -2229,6 +2229,7 @@ implementation (widget.cpp)
22292229
};
22302230
void widget::draw() { pimpl->draw(*this); }
22312231
widget::widget(int n) : pimpl{std::make_unique<impl>(n)} {}
2232+
widget::widget(widget&&) = default;
22322233
widget::~widget() = default;
22332234
widget& widget::operator=(widget&&) = default;
22342235

0 commit comments

Comments
 (0)