RAD Studio XE and boost library

Hi, Date and Time Formatted Input and Output Try to use a sample like this #include <boost/date_time/gregorian/gregorian.hpp> #include <iostream> #include <locale> int main() { boost::gregorian::date d(2009, 1, 7); boost::gregorian::date_facet *df = new boost::gregorian::date_facet("%A, %d %B %Y"); std::cout.imbue(std::locale(std::cout.getloc(), df)); std::cout << d << std::endl; } When compile I get [BCC32 Error] Unit1.cpp(86): E2316 'date_facet' is not a member of 'boost::gregorian' Appreciate any help. //Christer

On Thu, 16 Dec 2010 09:30:08 +0100, Christer Borgqvist <christer.borgqvist10@bredband.net> wrote:
Hi,
Date and Time Formatted Input and Output
Try to use a sample like this
#include <boost/date_time/gregorian/gregorian.hpp> #include <iostream> #include <locale> int main() { boost::gregorian::date d(2009, 1, 7); boost::gregorian::date_facet *df = new boost::gregorian::date_facet("%A, %d %B %Y"); std::cout.imbue(std::locale(std::cout.getloc(), df)); std::cout << d << std::endl;
}
When compile I get
[BCC32 Error] Unit1.cpp(86): E2316 'date_facet' is not a member of 'boost::gregorian'
Which Boost version do you use? Can you try to add another include for boost/date_time/gregorian/gregorian_io.hpp (that's where boost::gregorian::date_facet is defined)? Boris

The version is 1_39 included in the RAD Studio XE if i include boost/date_time/gregorian/gregorian_io.hpp and compile i get [BCC32 Error] special_values_formatter.hpp(45): E2285 Could not find a match for 'std::copy<_InIt,_OutIt>(char ( *) const[17],char ( *) const[17],std::back_insert_iterator<std::vector<std::string,std::allocator<std::string>
)' //Christer
"Boris Schaeling" <boris@highscore.de> skrev i meddelandet news:op.vnw547lkhcamje@bose.arnhem.chello.nl...
On Thu, 16 Dec 2010 09:30:08 +0100, Christer Borgqvist <christer.borgqvist10@bredband.net> wrote:
Hi,
Date and Time Formatted Input and Output
Try to use a sample like this
#include <boost/date_time/gregorian/gregorian.hpp> #include <iostream> #include <locale> int main() { boost::gregorian::date d(2009, 1, 7); boost::gregorian::date_facet *df = new boost::gregorian::date_facet("%A, %d %B %Y"); std::cout.imbue(std::locale(std::cout.getloc(), df)); std::cout << d << std::endl;
}
When compile I get
[BCC32 Error] Unit1.cpp(86): E2316 'date_facet' is not a member of 'boost::gregorian'
Which Boost version do you use? Can you try to add another include for boost/date_time/gregorian/gregorian_io.hpp (that's where boost::gregorian::date_facet is defined)?
Boris
participants (2)
-
Boris Schaeling
-
Christer Borgqvist