1 | /* |
2 | * util.hpp |
3 | * |
4 | * Created on: Jul 16, 2015 |
5 | * Author: i-bird |
6 | */ |
7 | |
8 | #ifndef SRC_GRID_UTIL_HPP_ |
9 | #define SRC_GRID_UTIL_HPP_ |
10 | |
11 | #include "util/common.hpp" |
12 | |
13 | template<typename T, typename Sfinae = void> |
14 | struct is_grid: std::false_type {}; |
15 | |
16 | |
17 | /*! \brief is_grid check if the type is a grid |
18 | * |
19 | * ### Example |
20 | * |
21 | * \snippet util_test.hpp Check is_grid |
22 | * |
23 | * return true if T is a grid |
24 | * |
25 | */ |
26 | template<typename T> |
27 | struct is_grid<T, typename Void< typename T::yes_i_am_grid>::type> : std::true_type |
28 | {}; |
29 | |
30 | |
31 | |
32 | |
33 | #endif /* SRC_GRID_UTIL_HPP_ */ |
34 | |