VCCC  2024.05
VisualCamp Common C++ library
copyable.hpp
Go to the documentation of this file.
1 //
2 // Created by yonggyulee on 2023/12/24.
3 //
4 
5 #ifndef VCCC_CONCEPTS_COPYABLE_HPP_
6 #define VCCC_CONCEPTS_COPYABLE_HPP_
7 
8 #include <type_traits>
9 
15 
16 namespace vccc {
17 namespace detail {
18 
20 struct copyable_impl
21  : conjunction<
22  copy_constructible<T>,
23  movable<T>,
24  assignable_from<T&, T&>,
25  assignable_from<T&, const T&>,
26  assignable_from<T&, const T>
27  > {};
28 
29 template<typename T>
30 struct copyable_impl<T, false> : std::false_type {};
31 
32 } // namespace detail
33 
36 
58 template<typename T>
59 struct copyable : detail::copyable_impl<T> {};
60 
62 
63 } // namespace vccc
64 
65 #endif // VCCC_CONCEPTS_COPYABLE_HPP_
Definition: directory.h:12
constexpr VCCC_INLINE_OR_STATIC detail::element_niebloid< 1 > value
Definition: key_value.hpp:35
specifies that an object of a type can be copied, moved, and swapped
Definition: copyable.hpp:59