Boost logo

Boost Users :

From: Ian (yg-boost-users_at_[hidden])
Date: 2003-06-24 01:57:32


Boosters:

Try as I might, I cannot figure a way of converting the following code
snippet to use std::for_each with boost::lamdba. Any ideas?

unsigned int table[1000];
for ( unsigned int* it = table_; it != table_ + (sizeof(table_) /
sizeof(unsigned int)); ++i ) {
    *it = ((int)it % 3);
}

The pointer to int cast is the killer, the docs mention the ret<> template
briefly, but it does not seem to help...

Cheers

Ian


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