Subject: Re: [boost] [log] Status
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2012-01-05 04:44:16
On Thursday, January 05, 2012 20:35:43 Arash Partow wrote:
> On 5/01/2012 7:08 PM, Andrey Semashev wrote:
> > On Thursday, January 05, 2012 18:49:46 Arash Partow wrote:
> >> Out of curiosity, have you considered at some point adding support for
> >> the new C++11 user-defined literals? I believe there would be a huge
> >> efficiency advantage in having the length of the literal at compile
> >> time, rather than having to determine it at run-time.
> > There is a tool named basic_string_literal that does it in C++03. Is
> > there something new in C++11 that helps in this area? Could you provide
> > a link to the proposal or a particular section in the standard?
> Is basic_string_literal in the log library? I'll have to look at that,
Yes, see boost/log/utility/string_literal.hpp.
> As for c++11 udsl, basically one can define a suffix for a particular type
> of string, and a corresponding handler operator, which takes a pointer to
> the literal and a size (length) value - which is determined at
> compile-time, hence no need for internal calls to strnlen (multipasses) or
> inefficient loops of pushing 1 char at-a-time to a stream(file, stdout
> etc..). [section 3.4]
Interesting, I wasn't aware of this extension. Thanks for the pointer. I'll
have to think if and how it can be applied to the library.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk