G
Gilles Rochefort
Hello,
I wrote the following code to wrap some existing C functions, and I get
some warning about converting float to int.
float zfactor;
int tmp_x[4], corners_x[4];
std::transform(tmp_x,tmp_x+4,corners_x, bind2nd( multiplies<float>(),zfactor) );
I know that I can solve the problem by writing a dedicated functor, but
I'd like to know if it exists a proper solution to do it in just one line
as above. I have to precise that I don't want to use SGI extensions such
as compose1, I look for a standard STL form.
Any ideas will be appreciated !
Regards,
Gilles Rochefort
I wrote the following code to wrap some existing C functions, and I get
some warning about converting float to int.
float zfactor;
int tmp_x[4], corners_x[4];
std::transform(tmp_x,tmp_x+4,corners_x, bind2nd( multiplies<float>(),zfactor) );
I know that I can solve the problem by writing a dedicated functor, but
I'd like to know if it exists a proper solution to do it in just one line
as above. I have to precise that I don't want to use SGI extensions such
as compose1, I look for a standard STL form.
Any ideas will be appreciated !
Regards,
Gilles Rochefort