macros.hpp
Go to the documentation of this file.
00001 
00010 /*****************************************************************************
00011 ** Ifdefs
00012 *****************************************************************************/
00013 
00014 #ifndef ECL_ERRORS_MACROS_HPP_
00015 #define ECL_ERRORS_MACROS_HPP_
00016 
00017 /*****************************************************************************
00018 ** PreProcessing
00019 *****************************************************************************/
00020 /*
00021  * Convert a variable name to a string.
00022  */
00023 #define STRINGIFY(x) #x
00024 #define TOSTRING(x)  STRINGIFY(x)
00025 
00026 /*
00027  * Joints two arguments together.
00028  * The following piece of macro magic joins the two
00029  * arguments together, even when one of the arguments is
00030  * itself a macro (see 16.3.1 in C++ standard).  The key
00031  * is that macro expansion of macro arguments does not
00032  * occur in BOOST_DO_JOIN2 but does in BOOST_DO_JOIN.
00033  */
00034 #define JOIN( X, Y ) DO_JOIN( X, Y )
00035 #define DO_JOIN( X, Y ) DO_JOIN2(X,Y)
00036 #define DO_JOIN2( X, Y ) X##Y
00037 
00046 #define LOC __FILE__ ":" TOSTRING(__LINE__) " "
00047 
00048 
00049 #endif /* ECL_ERRORS_MACROS_HPP_*/


ecl_errors
Author(s): Daniel Stonier (d.stonier@gmail.com)
autogenerated on Thu Jan 2 2014 11:11:33