Boost logo

Boost Users :

Subject: Re: [Boost-users] compilation error with mpl transform
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-07-18 00:01:37


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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net