VCCC  2024.05
VisualCamp Common C++ library
subtractable.hpp
Go to the documentation of this file.
1 //
2 // Created by yonggyulee on 2023/12/21.
3 //
4 
5 #ifndef VCCC_CONCEPTS_SUBTRACTABLE_HPP_
6 #define VCCC_CONCEPTS_SUBTRACTABLE_HPP_
7 
8 #include <type_traits>
9 
14 
15 namespace vccc {
16 
17 template<typename T, typename U, typename = void>
18 struct is_explicitly_subtractable : std::false_type {};
19 
20 template<typename T, typename U>
21 struct is_explicitly_subtractable<T, U, void_t<decltype(std::declval<T>() - std::declval<U>())>> : std::true_type {};
22 
24 struct is_subtractable_impl : std::false_type {};
25 
26 template<typename T>
27 struct is_subtractable_impl<T, true> : implicit_expression_check<is_explicitly_subtractable, const T&, const T&> {};
28 
29 
32 
33 template<typename T>
35 
37 
38 } // namespace vccc
39 
40 #endif // VCCC_CONCEPTS_SUBTRACTABLE_HPP_
void void_t
Definition: void_t.hpp:19
Definition: matrix.hpp:495
Definition: directory.h:12
constexpr VCCC_INLINE_OR_STATIC detail::element_niebloid< 1 > value
Definition: key_value.hpp:35
Definition: implicit_expression_check.hpp:48
Definition: subtractable.hpp:18
Definition: subtractable.hpp:24
Definition: subtractable.hpp:34