Ticket #4577: test.cpp
File test.cpp, 519 bytes (added by , 12 years ago) |
---|
Line | |
---|---|
1 | #include <boost/fusion/include/vector.hpp> |
2 | #include <boost/fusion/include/invoke.hpp> |
3 | #include <boost/fusion/include/transform.hpp> |
4 | |
5 | |
6 | using namespace boost::fusion; |
7 | |
8 | struct F{ |
9 | template<typename Sig> |
10 | struct result; |
11 | template<typename Self> |
12 | struct result<Self (int const &)>{ |
13 | typedef void type; |
14 | }; |
15 | void operator()(int const &) const{} |
16 | }; |
17 | |
18 | int t(int i){ return i; } |
19 | |
20 | int main(){ |
21 | vector<int> const vec(5); |
22 | invoke(F(),vec); |
23 | invoke(F(),transform(vec,&t)); |
24 | } |