Boost logo

Boost Users :

From: Sebastian Redl (sebastian.redl_at_[hidden])
Date: 2006-03-26 05:38:24


yinglcs2_at_[hidden] wrote:

>Hi,
>
>I am trying to use the transform algorithm to populate
>a deque<bool> :
>
>vector<int> orgList;
>deque<bool> skipped;
>
>transform(orgList.begin(), orgList.end(),
>back_inserter(skipped ) , _1 = false);
>
>But this does not compile, please tell me what did I
>do wrong?
>Thank you.
>
>
_1 is a function parameter, not a return value. Your use of transform
here does not make sense. Here's a better way:

deque<bool> skipped(orgList.size(), false);

Sebastian Redl


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