Opened 9 years ago

Closed 9 years ago

#8957 closed Bugs (fixed)

[log] compile error: doc's stream format tutorial sample

Reported by: Akira Takahashi <faithandbrave@…> Owned by: Andrey Semashev
Milestone: To Be Determined Component: log
Version: Boost 1.54.0 Severity: Problem
Keywords: Cc:

Description

I tried this sample (enable #if 0 code): http://www.boost.org/doc/libs/1_54_0/libs/log/example/doc/tutorial_fmt_stream.cpp

error line is follow:

xpr::format_date_time< boost::posix_time::ptime >("TimeStamp", "%Y-%m-%d %H:%M:%S")

error description:

/repository/Library/Boost/boost_1_54_0/boost/log/expressions/formatters/date_time.hpp:94:98: error: incomplete type 'boost::log::v2s_mt_posix::expressions::format_date_time_terminal<boost::posix_time::ptime, boost::log::v2s_mt_posix::fallback_to_none, char>::formatter_generator {aka boost::log::v2s_mt_posix::expressions::aux::date_time_formatter_generator_traits<boost::posix_time::ptime, char, void>}' used in nested name specifier

I think should add follow line:

#include <boost/log/support/date_time.hpp>

Change History (1)

comment:1 by Andrey Semashev, 9 years ago

Resolution: fixed
Status: newclosed

(In [85189]) Added missing includes. Fixes #8957.

Note: See TracTickets for help on using tickets.