From c68a395830ecce94165381c6a250eb65898371d3 Mon Sep 17 00:00:00 2001 From: Sergey Zubkov Date: Wed, 15 Jan 2020 16:38:44 -0500 Subject: [PATCH] [I.27] fix move ctor in the pimpl example (closes #1471) --- CppCoreGuidelines.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index f4585d1..0264d18 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -2212,7 +2212,7 @@ interface (widget.h) void draw(); // public API that will be forwarded to the implementation widget(int); // defined in the implementation file ~widget(); // defined in the implementation file, where impl is a complete type - widget(widget&&) = default; + widget(widget&&); // defined in the implementation file widget(const widget&) = delete; widget& operator=(widget&&); // defined in the implementation file widget& operator=(const widget&) = delete; @@ -2229,6 +2229,7 @@ implementation (widget.cpp) }; void widget::draw() { pimpl->draw(*this); } widget::widget(int n) : pimpl{std::make_unique(n)} {} + widget::widget(widget&&) = default; widget::~widget() = default; widget& widget::operator=(widget&&) = default;