B
Brandt Dusthimer
Hi all. I was wondering, is there any way of using the boost lambda types
as an index for a container? For example:
for_each(indexList.begin(), indexList.end(),
(
somelist[_1].someFunction()
));
Right now it doesn't work because:
error: no match for 'operator[]' in 'somelist[boost::lambda::unnamed::_1]'
Anyway of getting that _1 to turn into, say, an int or string or whatever
type the elements in indexList are? I'm guessing casting's not the
answer .
Thanks!
Brandt Dusthimer
as an index for a container? For example:
for_each(indexList.begin(), indexList.end(),
(
somelist[_1].someFunction()
));
Right now it doesn't work because:
error: no match for 'operator[]' in 'somelist[boost::lambda::unnamed::_1]'
Anyway of getting that _1 to turn into, say, an int or string or whatever
type the elements in indexList are? I'm guessing casting's not the
answer .
Thanks!
Brandt Dusthimer