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

stringize.hpp File Reference


Defines

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

#define BOOST_PREPROCESSOR_STRINGIZE(E)
 Obsolete. Use BOOST_PP_STRINGIZE(). More...


Detailed Description

Click here to see the header.


Define Documentation

#define BOOST_PP_STRINGIZE  
 

Delays the stringization of E.

For example,

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

// ...

#pragma NOTE("TBD!")

expands to:

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

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

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

#define BOOST_PREPROCESSOR_STRINGIZE  
 

Obsolete. Use BOOST_PP_STRINGIZE().


© Copyright Housemarque Oy 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: