-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathClient02.cpp
More file actions
37 lines (27 loc) · 930 Bytes
/
Client02.cpp
File metadata and controls
37 lines (27 loc) · 930 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
28
29
30
31
32
33
34
35
36
37
// ===========================================================================
// Client.cpp - Pimpl Idiom
// ===========================================================================
#include <iostream>
#include "Control.h"
void pimpl_02()
{
using namespace PimplVariant;
Control ctrl;
ctrl.resize(10, 15);
ctrl.hide();
ctrl.show();
}
void pimpl_02a()
{
using namespace PimplVariant;
Control ctrl;
ctrl.resize(100, 20);
// Control c2 = ctrl; // doesn't compile: std::unique_ptr !!!
// c2.show();
// Control c3 = std::move(ctrl); // doesn't compile
// PimplVariant::Control::Control(const PimplVariant::Control &)":
// (declared implicitly) cannot be referenced -- it is a deleted function
}
// ===========================================================================
// End-of-File
// ===========================================================================