c++boost.gif (8819 bytes)
Main Page   File List   File Members  

stringize.hpp File Reference


Defines

#define BOOST_PREPROCESSOR_STRINGIZE(E)
 Delays the stringization of E. More...


Detailed Description

Click here to see the header.


Define Documentation

#define BOOST_PREPROCESSOR_STRINGIZE  
 

Delays the stringization of E.

Example:

#define NOTE(STR)\
  message(__FILE__ "(" BOOST_PREPROCESSOR_STRINGIZE(__LINE__) ") : " STR)

// ...

#pragma NOTE("TBD!")

The above expands to:

  #pragma message("examples.cpp" "(" "20" ") : " "TBD!")

The use of BOOST_PREPROCESSOR_STRINGIZE() above lets the preprocessor expand the __LINE__ before stringizing it. If # would be used directly, the code would expand to:

  #pragma message("examples.cpp" "(" "__LINE__" ") : " "TBD!")


© Copyright Housemarque, Inc. 2001

Permission to copy, use, modify, sell and distribute this document is granted provided this copyright notice appears in all copies. This document is provided "as is" without express or implied warranty, and with no claim as to its suitability for any purpose.

Generated: