VCCC  2024.05
VisualCamp Common C++ library
is_explicitly_convertible.hpp
Go to the documentation of this file.
1 # /*
2 # * Created by YongGyu Lee on 2024/01/10.
3 # */
4 #
5 # ifndef VCCC_TYPE_TRAITS_IS_EXPLICITLY_CONVERTIBLE_HPP
6 # define VCCC_TYPE_TRAITS_IS_EXPLICITLY_CONVERTIBLE_HPP
7 #
8 # include <type_traits>
9 #
11 
12 namespace vccc {
13 
19 template<typename From, typename To, typename = void>
20 struct is_explicitly_convertible : std::false_type {};
21 
22 template<typename From, typename To>
23 struct is_explicitly_convertible<From, To, void_t<decltype(static_cast<To>(std::declval<From>()))>> : std::true_type {};
24 
26 
27 } // namespace vccc
28 
29 # endif // VCCC_TYPE_TRAITS_IS_EXPLICITLY_CONVERTIBLE_HPP
void void_t
Definition: void_t.hpp:19
Definition: matrix.hpp:495
Definition: directory.h:12
Definition: is_explicitly_convertible.hpp:20