OpenFPM_pdata  1.1.0
Project that contain the implementation of distributed structures
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Friends Pages
check_no_pointers.hpp
1 /*
2  * check_no_pointers.hpp
3  *
4  * Created on: Jul 7, 2015
5  * Author: i-bird
6  */
7 
8 #ifndef CHECK_NO_POINTERS_HPP_
9 #define CHECK_NO_POINTERS_HPP_
10 
11 #include "common.hpp"
12 
17 enum PNP
18 {
19  POINTERS,
20  NO_POINTERS,
21  UNKNOWN
22 };
23 
25 template<typename T, bool has_pointer=has_noPointers<T>::type::value >
27 {
29  static size_t value() {return T::noPointers();}
30 };
31 
33 template<typename T>
34 struct check_no_pointers_impl<T,false>
35 {
37  static size_t value() {return PNP::UNKNOWN;};
38 };
39 
52 template<typename T>
54 {
55  static size_t value() {return check_no_pointers_impl<T>::value();}
56 };
57 
58 
59 
60 
61 #endif /* CHECK_NO_POINTERS_HPP_ */
static size_t value()
Return PNP::UNKNOWN if the structure T does not specify if it has a pointer.
Check if the type T has pointers inside.
This class check if the type T has pointers inside.
static size_t value()
Return true if the structure T has a pointer.