OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
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
13template<typename T, typename Sfinae = void>
14struct has_max_prop_nn: std::false_type {};
15
25template<typename T>
26struct has_max_prop_nn<T, typename Void<decltype( T::max_prop )>::type> : std::true_type
27{};
28
29template<typename T, bool has_max_prop>
31{
32 enum
33 {
34 number = T::max_prop
35 };
36};
37
38template<typename T>
39struct max_prop_nn<T,false>
40{
41 enum
42 {
43 number = 0
44 };
45};
46
47
48template<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
64template<typename T>
65struct 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:74