Boost logo

Boost :

From: jorg.schaible_at_[hidden]
Date: 2000-02-17 10:24:34


Hi Miki,

you know the meaning of "#pragma"? After a #pramga directive a compiler vendor
may introduce his own keywords and functions and hopefully all current compiler
ignore the keyword after pragma if they don't know it. The "#pramga message" is
MS specific. Others use "#pragma warning" or do not have such a mechanism at
all.

Therefore I'll stick with the "// TODO:"

Regards,
Jörg

---------------------------------------- Message History
      ----------------------------------------

From: miki_at_[hidden] on 17/02/2000 15:10

Please respond to boost_at_[hidden]

To: boost_at_[hidden]
cc:
Subject: [boost] TODO reminder


Hi all,

How do you keep track of places in your code which you need to re-visit
to improve, implement of check otherwise? For the longest time I was
using comments like:

  // TODO: Fix this.

But little while ago there was a discussion on one of the boards about
#pragma message, and I wrote a macro that I found irreplaceable since.
So, here it is, and you all can tell me if there is a place in the
boost library for it.

#define hidden_quote( s ) #s
#define hidden_numquote( n ) hidden_quote( n )
#define TODO( msg ) message( __FILE__ "(" hidden_numquote( __LINE__ )
"): TODO: " msg )

The only macro that should be used is the TODO. It lets you put
comments in your code like this:

  #pragma TODO( "Fix this." )

This line would produce compiler output like:

C:\Projects\Test\Test.c(34): TODO: Fix this.

Nice thing about the macro is that it identifies file and line number,
and it lets IDE's take you there immediately. Not so nice thing...
#pragma is not in the macro. If anyone can put it in, please let me
know.

Cheers,

Miki Jovanovic.

------------------------------------------------------------------------
*** Got Questions? Get Answers. Got Answers? Get Paid. ***
Sign up at Infomarco.com and you can win $30,000 cash or a trip to China.
http://click.egroups.com/1/1251/1/_/9351/_/950800245/

-- Talk to your group with your own voice!
-- http://www.egroups.com/VoiceChatPage?listName=boost&m=1


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