File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,11 +57,11 @@ class SalesData final
5757 SalesData () = default ;
5858 ~SalesData () = default ;
5959
60- SalesData (const SalesData &) = default ;
61- SalesData& operator =(const SalesData &) = default ;
60+ SalesData (const this_type &) = default ;
61+ SalesData& operator =(const this_type &) = default ;
6262
63- SalesData (SalesData && s) = default ;
64- SalesData& operator =(SalesData && s) = default ;
63+ SalesData (this_type && s) = default ;
64+ SalesData& operator =(this_type && s) = default ;
6565
6666private:
6767 string_type m_id = " " ;
Original file line number Diff line number Diff line change @@ -11,14 +11,15 @@ BEGIN_NAMESPACE(cpp_study)
1111class SpinLock final
1212{
1313public:
14+ using this_type = SpinLock;
1415 using atomic_type = std::atomic_flag;
1516
1617public:
1718 SpinLock () = default ;
1819 ~SpinLock () = default ;
1920
20- SpinLock (const SpinLock &) = delete ;
21- SpinLock& operator =(const SpinLock &) = delete ;
21+ SpinLock (const this_type &) = delete ;
22+ SpinLock& operator =(const this_type &) = delete ;
2223public:
2324 void lock () noexcept
2425 {
@@ -49,6 +50,7 @@ class SpinLock final
4950class SpinLockGuard final
5051{
5152public:
53+ using this_type = SpinLockGuard;
5254 using spin_lock_type = SpinLock;
5355public:
5456 SpinLockGuard (spin_lock_type& lock) noexcept
@@ -63,8 +65,8 @@ class SpinLockGuard final
6365 }
6466
6567public:
66- SpinLockGuard (const SpinLockGuard &) = delete ;
67- SpinLockGuard& operator =(const SpinLockGuard &) = delete ;
68+ SpinLockGuard (const this_type &) = delete ;
69+ SpinLockGuard& operator =(const this_type &) = delete ;
6870private:
6971 spin_lock_type& m_lock;
7072};
Original file line number Diff line number Diff line change @@ -28,8 +28,8 @@ class Summary final
2828 Summary () = default ;
2929 ~Summary () = default ;
3030
31- Summary (const Summary &) = delete ;
32- Summary& operator =(const Summary &) = delete ;
31+ Summary (const this_type &) = delete ;
32+ Summary& operator =(const this_type &) = delete ;
3333private:
3434 mutable lock_type m_lock;
3535 map_type m_sales;
Original file line number Diff line number Diff line change @@ -23,6 +23,9 @@ class ZmqContext final
2323 using zmq_socket_type = zmq::socket_t;
2424 using zmq_message_type = zmq::message_t;
2525#endif
26+ public:
27+ ZmqContext () = default ;
28+ ~ZmqContext () = default ;
2629public:
2730 static
2831 zmq_context_type& context ()
You can’t perform that action at this time.
0 commit comments