DIY 3.0 data-parallel out-of-core C++ library

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Examples

- File List

All Classes Namespaces Functions Typedefs Groups Pages
block_traits.hpp
1 #ifndef DIY_BLOCK_TRAITS_HPP
2 #define DIY_BLOCK_TRAITS_HPP
3
4 #include "traits.hpp"
5
6 namespace diy
7 {
8 namespace detail
9 {
10 template<class F>
11 struct block_traits
12 {
13 typedef typename std::remove_pointer<typename function_traits<F>::template arg<0>::type>::type type;
14 };
15
16 // matches block member functions
17 template<class Block, class R, class... Args>
18 struct block_traits<R(Block::*)(Args...)>
19 {
20 typedef Block type;
21 };
22
23 template<class Block, class R, class... Args>
24 struct block_traits<R(Block::*)(Args...) const>
25 {
26 typedef Block type;
27 };
28 }
29 }
30
31 #endif