sandbox
Loading...
Searching...
No Matches
noncopyable.hpp
1#ifndef LIBSBX_UTILITY_NONCOPYABLE_HPP_
2#define LIBSBX_UTILITY_NONCOPYABLE_HPP_
3
4namespace sbx::utility {
5
6struct noncopyable {
7
8 noncopyable(const noncopyable&) = delete;
9
10 noncopyable(noncopyable&&) noexcept = default;
11
12 auto operator=(const noncopyable&) -> noncopyable& = delete;
13
14 auto operator=(noncopyable&&) noexcept -> noncopyable& = default;
15
16protected:
17
18 noncopyable() = default;
19
20 ~noncopyable() = default;
21
22}; // struct noncopyable
23
24} // namespace sbx::utility
25
26#endif // LIBSBX_UTILITY_NONCOPYABLE_HPP_
Definition: noncopyable.hpp:6