Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //#include <boost/fusion/container/vector.hpp>
- #include <boost/mpl/vector.hpp>
- #include <boost/fusion/algorithm/transformation/transform.hpp>
- #include <boost/fusion/container/vector/convert.hpp>
- #include <boost/type_traits/remove_pointer.hpp>
- namespace fusion = boost::fusion;
- namespace mpl = boost::mpl;
- template <typename... T>
- struct inspect {
- };
- template <typename... Args>
- struct testcase
- {
- using argvec = boost::mpl::vector<Args...>;
- using noptrs = typename fusion::result_of::transform
- <argvec, boost::remove_pointer<mpl::_>>::type;
- using type = typename inspect
- <typename fusion::result_of::as_vector<noptrs>::type>::
- type;
- };
- int main() {
- using x = testcase<int*, int(*)(double)>::type;
- }
- /*
- * test-fusion.cpp: In instantiation of ‘struct testcase<int*, int (*)(double)>’:
- * test-fusion.cpp:26:45: required from here
- * test-fusion.cpp:22:33: error: no type named ‘type’ in ‘struct inspect<boost::fusion::vector2<boost::fusion::detail::apply_transform_result<int>, boost::fusion::detail::apply_transform_result<int(double)> > >’
- * type;
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement