[Boost.Log] Example tutorial_fmt_stream.cpp does not compile

I am trying to change date formatting exactly in the way as described in
the tutorial, sub-section "Specialized formatters":
http://www.boost.org/doc/libs/1_54_0/libs/log/doc/html/log/tutorial/formatte...
What I want to achieve is pretty simple, change month output from the
default "Abbreviated month name" (%b):
[2013-Jul-08 10:51:00.989235]
to "Month name as a decimal 01 to 12" (%m):
[2013-07-08 10:51:00.989235]
Unfortunately this does not compile, nor does the example from which the
snipped is taken: "tutorial_fmt_stream.cpp".
The interesting part in the example source is commented out by default.
(But this was the case with other examples too.)
The part I'm interested in is in line 60 (from current Boost 1.54.0):
expr::format_date_time< boost::posix_time::ptime >("TimeStamp",
"%Y-%m-%d %H:%M:%S")
The errors I get (Win7, 64-bit, MS VC++ 2010):
error C2027: use of undefined type
"boost::log::v2s_mt_nt5::expressions::aux::date_time_formatter_generator_traits

Still need help with this one. :-) Am 08.07.2013 18:22, schrieb Mario Knezović:
I am trying to change date formatting exactly in the way as described in the tutorial, sub-section "Specialized formatters":
http://www.boost.org/doc/libs/1_54_0/libs/log/doc/html/log/tutorial/formatte...
What I want to achieve is pretty simple, change month output from the default "Abbreviated month name" (%b): [2013-Jul-08 10:51:00.989235] to "Month name as a decimal 01 to 12" (%m): [2013-07-08 10:51:00.989235]
Unfortunately this does not compile, nor does the example from which the snipped is taken: "tutorial_fmt_stream.cpp".
The interesting part in the example source is commented out by default. (But this was the case with other examples too.)
The part I'm interested in is in line 60 (from current Boost 1.54.0):
expr::format_date_time< boost::posix_time::ptime >("TimeStamp", "%Y-%m-%d %H:%M:%S")
The errors I get (Win7, 64-bit, MS VC++ 2010):
error C2027: use of undefined type "boost::log::v2s_mt_nt5::expressions::aux::date_time_formatter_generator_traits
" d:\boost\boost_1_54_0\boost\log\expressions\formatters\date_time.hpp 94 error C3861: "parse": Identifier not found. d:\boost\boost_1_54_0\boost\log\expressions\formatters\date_time.hpp 94
I hope somebody can help or point me in the right direction.
Thank you!
Mario Knezović
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (1)
-
Mario Knezović