17 #ifndef IOX_UTILS_CONCURRENT_SMART_LOCK_HPP
18 #define IOX_UTILS_CONCURRENT_SMART_LOCK_HPP
51 template <
typename T,
typename MutexType = ::std::mutex>
58 Proxy(T* base, MutexType* lock) noexcept;
61 T* operator->() noexcept;
62 T* operator->() const noexcept;
71 smart_lock() noexcept;
74 smart_lock(const T& t) noexcept;
77 template <typename... ArgTypes>
78 smart_lock(ArgTypes&&... args) noexcept;
80 smart_lock(const smart_lock& rhs) noexcept;
81 smart_lock(smart_lock&& rhs) noexcept;
82 smart_lock& operator=(const smart_lock& rhs) noexcept;
83 smart_lock& operator=(smart_lock&& rhs) noexcept;
84 ~smart_lock() noexcept = default;
95 Proxy operator->() noexcept;
106 Proxy operator->() const noexcept;
129 Proxy GetScopeGuard() noexcept;
152 Proxy GetScopeGuard() const noexcept;
155 T GetCopy() const noexcept;
159 mutable MutexType lock;
164 #include "iceoryx_utils/internal/concurrent/smart_lock.inl"
building block to easily create free function for logging in a library context
Definition: lockfree_queue.hpp:28