OpenFPM_data  0.1.0
Project that contain the implementation and interfaces for basic structure like vectors, grids, graph ... .
 All Data Structures Namespaces Functions Variables Typedefs Friends
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 
24 template<typename T, bool has_pointer=has_noPointers<T>::type::value >
26 {
27  static size_t value() {return T::noPointers();}
28 };
29 
30 template<typename T>
31 struct check_no_pointers_impl<T,false>
32 {
33  static size_t value() {return PNP::UNKNOWN;};
34 };
35 
48 template<typename T>
50 {
51  static size_t value() {return check_no_pointers_impl<T>::value();}
52 };
53 
54 
55 
56 
57 #endif /* CHECK_NO_POINTERS_HPP_ */
This class check if the type T has pointers inside.