Dear all,

I am using a boost::date_time::local_date_time and I have a problem when a local_date_time is declared as class member.

Case 1

class  toto
{
protected:
    boost::local_time::local_date_time tt ;
public:
    toto(boost::local_time::local_date_time t) : tt(t) {}
    ~toto(){}
};
=> compil ok
===========
Case 2 (using '=' operator)
class  toto
{
protected:
    boost::local_time::local_date_time tt ;
public:
    toto(boost::local_time::local_date_time t) {
        tt=t;
    }
    ~toto(){}
};
=> does not compiles !
Errors:

make all
Building file: ../src/toto.cpp
Invoking: GCC C++ Compiler
g++ -I"/home/fabien/dev/eclipse_workspace" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/toto.d" -MT"src/toto.d" -o"src/toto.o" "../src/toto.cpp"
../src/toto.cpp: In constructor ‘toto::toto(boost::local_time::local_date_time)’:
../src/toto.cpp:16: error: no matching function for call to ‘boost::local_time::local_date_time_base<boost::posix_time::ptime, boost::date_time::time_zone_base<boost::posix_time::ptime, char> >::local_date_time_base()’
/usr/include/boost/date_time/local_time/local_date_time.hpp:218: note: candidates are: boost::local_time::local_date_time_base<utc_time_, tz_type>::local_date_time_base(boost::date_time::special_values, boost::shared_ptr<U>) [with utc_time_ = boost::posix_time::ptime, tz_type = boost::date_time::time_zone_base<boost::posix_time::ptime, char>]
/usr/include/boost/date_time/local_time/local_date_time.hpp:211: note:                 boost::local_time::local_date_time_base<utc_time_, tz_type>::local_date_time_base(const boost::local_time::local_date_time_base<utc_time_, tz_type>&) [with utc_time_ = boost::posix_time::ptime, tz_type = boost::date_time::time_zone_base<boost::posix_time::ptime, char>]
/usr/include/boost/date_time/local_time/local_date_time.hpp:141: note:                 boost::local_time::local_date_time_base<utc_time_, tz_type>::local_date_time_base(typename utc_time_::date_type, typename utc_time_::time_duration_type, boost::shared_ptr<U>, boost::local_time::local_date_time_base<utc_time_, tz_type>::DST_CALC_OPTIONS) [with utc_time_ = boost::posix_time::ptime, tz_type = boost::date_time::time_zone_base<boost::posix_time::ptime, char>]
/usr/include/boost/date_time/local_time/local_date_time.hpp:100: note:                 boost::local_time::local_date_time_base<utc_time_, tz_type>::local_date_time_base(typename utc_time_::date_type, typename utc_time_::time_duration_type, boost::shared_ptr<U>, bool) [with utc_time_ = boost::posix_time::ptime, tz_type = boost::date_time::time_zone_base<boost::posix_time::ptime, char>]
/usr/include/boost/date_time/local_time/local_date_time.hpp:79: note:                 boost::local_time::local_date_time_base<utc_time_, tz_type>::local_date_time_base(utc_time_, boost::shared_ptr<U>) [with utc_time_ = boost::posix_time::ptime, tz_type = boost::date_time::time_zone_base<boost::posix_time::ptime, char>]
make: *** [src/toto.o] Error 1

I am using:
Linux  2.6.23.8-34.fc7
boost-1.33.1-15.fc7
boost-devel-1.33.1-15.fc7
g++ (GCC) 4.1.2 20070925 (Red Hat 4.1.2-27)

Thanks for your help !
Regards,

Fabien CARMAGNAC




Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail