-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathClient04.cpp
More file actions
27 lines (20 loc) · 745 Bytes
/
Client04.cpp
File metadata and controls
27 lines (20 loc) · 745 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// ===========================================================================
// Client.cpp - Pimpl Idiom with separate header file
// ===========================================================================
#include <iostream>
#include "Control.h"
void pimpl_04()
{
using namespace PimplVariantWithSeparateHeaderFile;
Control ctrl;
ctrl.resize(50, 70);
ctrl.setText("another sample control");
ctrl.hide();
Control c2 = ctrl; // copy: compiles !!!
c2.show();
Control c3 = std::move(ctrl); // move: compiles !!!
c3.hide();
}
// ===========================================================================
// End-of-File
// ===========================================================================