compilation error with mpl transform

Is the following supposed to work? I feel like I'm missing something obvious: typedef boost::mpl::vector<int, float, double> vec_type; template<template<class T>, class U> struct parameterize { typedef T<U> type; }; template<class T> class wrapper { }; typedef boost::mpl::transform<vec_type, parameterize<wrapper, boost::mpl::_1> > wrapped_vec; When I do this I get compile errors on MSVC 9.0. However if I remove the template template and hardcode T to wrapper in struct parameterize, it works fine.

AMDG Zachary Turner wrote:
Is the following supposed to work? I feel like I'm missing something obvious:
typedef boost::mpl::vector<int, float, double> vec_type;
template<template<class T>, class U> struct parameterize { typedef T<U> type; };
template<class T> class wrapper { };
typedef boost::mpl::transform<vec_type, parameterize<wrapper, boost::mpl::_1> > wrapped_vec;
When I do this I get compile errors on MSVC 9.0. However if I remove the template template and hardcode T to wrapper in struct parameterize, it works fine.
MPL Lambda only works with templates that have only plain "class T" template parameters. In Christ, Steven Watanabe
participants (2)
-
Steven Watanabe
-
Zachary Turner