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
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>
30
struct
max_prop_nn
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>
49
struct
has_max_prop
50
{
51
typedef
has_max_prop<typename T::value_type,has_value_type_ofp< typename T::value_type >::value
>
hmp
;
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
{
69
value =
has_max_prop_nn<T>::value
70
};
71
72
enum
73
{
74
number =
max_prop_nn<T,has_max_prop_nn<T>::value
>::number
75
};
76
};
77
78
79
80
81
#endif
/* OPENFPM_DATA_SRC_PACKER_UNPACKER_HAS_MAX_PROP_HPP_ */
Void
Void structure.
Definition
common.hpp:74
has_max_prop_nn
Definition
has_max_prop.hpp:14
has_max_prop
Definition
has_max_prop.hpp:50
max_prop_nn
Definition
has_max_prop.hpp:31
openfpm_data
src
Packer_Unpacker
has_max_prop.hpp
Generated by
1.9.8