|
Boost : |
Subject: Re: [boost] [log] Status (was: Is there any interest in a Group of library like to Application System!)
From: Arash Partow (arash_at_[hidden])
Date: 2012-01-05 04:35:43
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,
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] http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2378.pdf
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk