I saw both of std::tr1::ref and std::ref in GCC4.5
what are the differents between them?
Is ref really pass the address of variable into the functor
or capable to pass functor by reference?
Or they just mimic the behaviors of reference?
I am kind of confusing about these
besides, since bind, function, men_fn, lambda and the others tools emerge
do we still have to make the functor adaptable?
If so, how to?Since bind could make the functor bind more than two variables
1 2 3
|
std::vector<int> one(100);
FFT<int, int> fft(99, 100); //some kinds of functor
std::for_each(one.begin(), one.end(), std::tr1::ref(fft) );
|
Thanks a lot