CatapultServer  v0.5.0.1 (Elephant)
NonCopyable.h
Go to the documentation of this file.
1 
21 #pragma once
22 
23 namespace catapult { namespace utils {
24 
26  class NonCopyable {
27  public:
29  constexpr NonCopyable() = default;
30 
32  ~NonCopyable() = default;
33 
34  public:
36  NonCopyable(const NonCopyable&) = delete;
37 
39  NonCopyable& operator=(const NonCopyable&) = delete;
40  };
41 
43  class MoveOnly {
44  public:
46  constexpr MoveOnly() = default;
47 
49  ~MoveOnly() = default;
50 
51  public:
53  MoveOnly(const NonCopyable&) = delete;
54 
56  MoveOnly(MoveOnly&&) = default;
57 
59  MoveOnly& operator=(const MoveOnly&) = delete;
60 
62  MoveOnly& operator=(MoveOnly&&) = default;
63  };
64 }}
catapult::utils::NonCopyable::~NonCopyable
~NonCopyable()=default
Default destructor.
catapult::utils::MoveOnly::MoveOnly
constexpr MoveOnly()=default
Default constructor.
catapult::utils::MoveOnly::~MoveOnly
~MoveOnly()=default
Default destructor.
catapult::utils::NonCopyable::NonCopyable
constexpr NonCopyable()=default
Default constructor.
catapult::utils::MoveOnly::operator=
MoveOnly & operator=(const MoveOnly &)=delete
Disabled assignment operator.
catapult::utils::MoveOnly
A class that can be moved but not copied.
Definition: NonCopyable.h:43
catapult::utils::NonCopyable::operator=
NonCopyable & operator=(const NonCopyable &)=delete
Disabled assignment operator.
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::utils::NonCopyable
A class that can neither be copied nor moved.
Definition: NonCopyable.h:26