Boost logo

Boost Users :

Subject: [Boost-users] error C2825: 'F': must be a class or namespace when followed by '::'
From: simone pilozzi (simonepilozzi_at_[hidden])
Date: 2011-04-20 13:01:13


Dear Users,

I am using a pointer to a function member with the std::transform alorithm.
The class is a QuantLib class called DayCounter and the method is called
yearFraction
and takes in two mandatory dates and two optionals to return the
corresponding year fraction.

*yearFraction ( QuantLib::Date t1,QuantLib::Date t2,QuantLib::Date t3 =
Date(),QuantLib::Date t4=Date())*

Now I tried to fill a vector called yearfracs in this way

boost::shared_ptr<QuantLib::DayCounter> dc( new QuantLib::ActualActual);

QuantLib::Date t = todaysDate()

std::vector<QuantLib::Time> yearfracs;

 std::transform(subsample.begin(),subsample.end(),

yearfracs.begin(),boost::bind(&QuantLib::ActualActual::yearFraction,&dc,t,_2))

subsample is the originary vector of dates.

The compiler reported the following error

error C2825: 'F': must be a class or namespace when followed by '::'

What is the correct syntax for doing this?

Thanks in advance

Simone



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