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