5 # ifndef VCCC_OPTIONAL_INTERNAL_TRAITS_H_
6 # define VCCC_OPTIONAL_INTERNAL_TRAITS_H_
8 # include <type_traits>
15 struct conditional_tf : std::conditional_t<v, std::true_type, std::false_type> {};
18 using conditional_tf_t =
typename conditional_tf<v>::type;
20 template<
typename Original,
typename Other>
21 struct check_constructible :
23 !std::is_constructible<Original, Other & >::value && !std::is_constructible<Original, Other const& >::value &&
24 !std::is_constructible<Original, Other &&>::value && !std::is_constructible<Original, Other const&&>::value> {};
26 template<
typename Original,
typename Other>
27 struct check_convertible :
29 !std::is_convertible<Other & , Original>::value && !std::is_convertible<Other const& , Original>::value &&
30 !std::is_convertible<Other &&, Original>::value && !std::is_convertible<Other const&&, Original>::value> {};
32 template<
typename Original,
typename Other>
33 struct check_assignable :
35 !std::is_assignable<Original&, Other & >::value && !std::is_assignable<Original&, Other const& >::value &&
36 !std::is_assignable<Original&, Other &&>::value && !std::is_assignable<Original&, Other const&&>::value> {};
40 #if __cplusplus <= 201703
41 using type = std::decay_t<T>;
43 using type = std::remove_cvref_t<T>;
48 using strip_t =
typename strip<T>::type;
Definition: directory.h:12