VCCC  2024.05
VisualCamp Common C++ library
hash.h
Go to the documentation of this file.
1 # /*
2 # * Created by YongGyu Lee on 2021/05/25.
3 # */
4 #
5 # ifndef VCCC_OPTIONAL_INTERNAL_HASH_H_
6 # define VCCC_OPTIONAL_INTERNAL_HASH_H_
7 #
8 # include <functional>
9 # include <type_traits>
10 
11 namespace vccc {
12 namespace internal {
13 namespace optional {
14 
15 struct not_constructible {
16  not_constructible() = delete;
17 };
18 
19 struct constructible {};
20 
21 template<typename T>
22 using hash_constructible =
23 std::conditional_t<
24  std::is_default_constructible<std::hash<T>>::value,
25  constructible,
26  not_constructible>;
27 
28 } // namespace optional
29 } // namespace internal
30 } // namespace vccc
31 
32 # endif // VCCC_OPTIONAL_INTERNAL_HASH_H_
Definition: directory.h:12
constexpr VCCC_INLINE_OR_STATIC detail::element_niebloid< 1 > value
Definition: key_value.hpp:35