|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 (permalink) |
|
Messages: n/a
Hébergeur: |
On Oct 11, 3:06 pm, jtorjo2...@yahoo.com wrote:
> Hi all, > > I've added documentation for the Logging Lib v2 :http://torjo.com/log2/(Logging homepage)http://torjo.com/log2/doc/html/(documentation) FWIW, I made a toy logging library, which applies "type erasure" to streams. If interested, see: http://p-stade.sourceforge.net/napkin/index.html Regards, -- Shunsuke Sogame [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] |
|
|
|
#2 (permalink) |
|
Messages: n/a
Hébergeur: |
On Oct 16, 7:45 am, shunsuke <pstade...@gmail.com> wrote:
> > FWIW, I made a toy logging library, which applies "type erasure" to > streams. > If interested, see:http://p-stade.sourceforge.net/napkin/index.html It's cute. I like most of it. It wouldn't likely meet our performance requirements but is dead simple. The only thing I would change is the PSTADE_IF_DEBUG and PSTADE_UNPARENTHESIZE which are completely unnecessary. At least the unparenthesize one is. You could define PSTADE_IF_DEBUG as 'if(true)' and 'if(false)' and then require the user uses {} instead of (), or you could just have the user type 'if(PSTADE_DEBUG)' themselves. Either way just about every compiler I know of will completely remove the if when the conditional is a constant literal. Neal -- [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] |
|
|
|
#3 (permalink) |
|
Messages: n/a
Hébergeur: |
On Oct 17, 9:11 am, "Neal E. Coombes" <neal.coom...@gmail.com> wrote:
> It's cute. I like most of it. It wouldn't likely meet our > performance requirements but is dead simple. The only thing I would > change is the PSTADE_IF_DEBUG and PSTADE_UNPARENTHESIZE which are > completely unnecessary. At least the unparenthesize one is. You > could define PSTADE_IF_DEBUG as 'if(true)' and 'if(false)' and then > require the user uses {} instead of (), or you could just have the > user type 'if(PSTADE_DEBUG)' themselves. An if-statememnt introduces a scope. Anyway I tend to prefer #if to IF_DEBUG these days. > Either way just about every > compiler I know of will completely remove the if when the conditional > is a constant literal. Thanks for the good news. I didn't know certainly that. :-) I will update my debugging macros, which will be something like: DEBUG_EXPR(std::cout) << 1 << 2 << 3; DEBUG_BLOCK { std::cout << 1 << 2 << 3; } Regards, -- Shunsuke Sogame -- [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] |
|
![]() |
| Outils de la discussion | |
|
|