CatapultServer  v0.5.0.1 (Elephant)
StlTraits.h
Go to the documentation of this file.
1 
21 #pragma once
22 #include <map>
23 #include <unordered_map>
24 
25 namespace catapult { namespace utils { namespace traits {
26 
29  template<typename T>
30  struct is_map : std::false_type {};
31 
32  template<typename ...TArgs>
33  struct is_map<std::map<TArgs...>> : std::true_type {};
34 
35  template<typename ...TArgs>
36  struct is_map<const std::map<TArgs...>> : std::true_type {};
37 
38  template<typename ...TArgs>
39  struct is_map<std::unordered_map<TArgs...>> : std::true_type {};
40 
41  template<typename ...TArgs>
42  struct is_map<const std::unordered_map<TArgs...>> : std::true_type {};
43 
45  template<typename T>
46  inline constexpr bool is_map_v = is_map<T>::value;
47 }}}
catapult::utils::traits::is_map
Definition: StlTraits.h:30
catapult::utils::traits::is_map_v
constexpr bool is_map_v
true if T is a standard map type, false otherwise.
Definition: StlTraits.h:46
catapult
Definition: AddressExtractionExtension.cpp:28