OpenFPM_pdata  1.1.0
Project that contain the implementation of distributed structures
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Friends Pages
has_max_prop.hpp
1 /*
2  * has_max_prop.hpp
3  *
4  * Created on: Jul 27, 2016
5  * Author: yaroslav
6  */
7 
8 #ifndef OPENFPM_DATA_SRC_PACKER_UNPACKER_HAS_MAX_PROP_HPP_
9 #define OPENFPM_DATA_SRC_PACKER_UNPACKER_HAS_MAX_PROP_HPP_
10 
11 #include "util/common.hpp"
12 
13 template<typename T, typename Sfinae = void>
14 struct has_max_prop_nn: std::false_type {};
15 
25 template<typename T>
26 struct has_max_prop_nn<T, typename Void<decltype( T::max_prop )>::type> : std::true_type
27 {};
28 
29 template<typename T, bool has_max_prop>
31 {
32  enum
33  {
34  number = T::max_prop
35  };
36 };
37 
38 template<typename T>
39 struct max_prop_nn<T,false>
40 {
41  enum
42  {
43  number = 0
44  };
45 };
46 
47 
48 template<typename T, bool hvt>
50 {
52 
53  enum
54  {
55  value = hmp::value
56  };
57 
58  enum
59  {
60  number = hmp::number
61  };
62 };
63 
64 template<typename T>
65 struct has_max_prop<T,false>
66 {
67  enum
68  {
70  };
71 
72  enum
73  {
75  };
76 };
77 
78 
79 
80 
81 #endif /* OPENFPM_DATA_SRC_PACKER_UNPACKER_HAS_MAX_PROP_HPP_ */
Void structure.
Definition: common.hpp:63