Boost logo

Boost :

Subject: Re: [boost] [log] Release candidate 1
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2013-03-11 11:19:34


On Mon, Mar 11, 2013 at 6:48 PM, Klaim - Joël Lamotte <mjklaim_at_[hidden]> wrote:
> As said before I'm upgrading to V2 and adapting my code accordingly.
>
> I have a problem I can't figure what exactly is the source (I'm using
> VS2012 Update1):
>
> namespace blog = boost::log;
> namespace expr = blog::expressions;
>
> const auto FORMAT_MODULE_NAME = expr::attr< std::string >(
> logattr::MODULE_NAME );
> const auto FORMAT_TIMESTAMP =
> expr::format_date_time<boost::posix_time::ptime>( logattr::TIMESTAMP,
> "%Y-%m-%d %H:%M:%S" );
> const auto FORMAT_MESSAGE = expr::message;
>
> const auto a = expr::stream << FORMAT_TIMESTAMP; // compiles
> const auto c = expr::stream << FORMAT_MODULE_NAME; // compiles
> const auto d = expr::stream << FORMAT_MESSAGE; // error: no operator "<<"
> matches these operand
> const auto e = expr::stream << "test"; // error: no operator "<<" matches
> these operand
> const auto f = expr::stream << std::string("test"); // error: no operator
> "<<" matches these operand
>
> Any idea what I'm missing?
> It was working with previous versions.

Could you send me a complete compilable code sample?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk