Go to the documentation of this file.
10 #define KAZV_DECLARE_COPYABLE(typeName) \
11 typeName(const typeName &that); \
12 typeName(typeName &&that); \
13 typeName &operator=(const typeName &that); \
14 typeName &operator=(typeName &&that);
16 #define KAZV_DEFINE_COPYABLE_UNIQUE_PTR(typeName, privateName) \
17 typeName::typeName(const typeName &that) \
18 : privateName(std::make_unique<decltype(privateName)::element_type>(*(that.privateName))) \
21 typeName::typeName(typeName &&that) \
22 : privateName(std::move(that.privateName)) \
25 typeName &typeName::operator=(const typeName &that) \
27 if (privateName != that.privateName) { \
28 privateName.reset(); \
29 privateName = std::make_unique<decltype(privateName)::element_type>(*(that.privateName)); \
33 typeName &typeName::operator=(typeName &&that) \
35 if (privateName != that.privateName) { \
36 privateName.reset(); \
37 privateName = std::move(that.privateName); \