00001 /************************************************************** ggt-head beg 00002 * 00003 * GGT: Generic Graphics Toolkit 00004 * 00005 * Original Authors: 00006 * Allen Bierbaum 00007 * 00008 * ----------------------------------------------------------------- 00009 * File: $RCSfile: Meta.h,v $ 00010 * Date modified: $Date: 2002/07/11 21:17:37 $ 00011 * Version: $Revision: 1.1 $ 00012 * ----------------------------------------------------------------- 00013 * 00014 *********************************************************** ggt-head end */ 00015 /*************************************************************** ggt-cpr beg 00016 * 00017 * GGT: The Generic Graphics Toolkit 00018 * Copyright (C) 2001,2002 Allen Bierbaum 00019 * 00020 * This library is free software; you can redistribute it and/or 00021 * modify it under the terms of the GNU Lesser General Public 00022 * License as published by the Free Software Foundation; either 00023 * version 2.1 of the License, or (at your option) any later version. 00024 * 00025 * This library is distributed in the hope that it will be useful, 00026 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00027 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00028 * Lesser General Public License for more details. 00029 * 00030 * You should have received a copy of the GNU Lesser General Public 00031 * License along with this library; if not, write to the Free Software 00032 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00033 * 00034 ************************************************************ ggt-cpr end */ 00035 #ifndef _GMTL_METAPROGRAMMING_H 00036 #define _GMTL_METAPROGRAMMING_H 00037 00038 00039 /*** STRINGIZE and JOIN macros */ 00040 /* Taken from boost (see boost.org) */ 00041 00042 // 00043 // Helper macro GMTL_STRINGIZE: 00044 // Converts the parameter X to a string after macro replacement 00045 // on X has been performed. 00046 // 00047 #define GMTL_STRINGIZE(X) GMTL_DO_STRINGIZE(X) 00048 #define GMTL_DO_STRINGIZE(X) #X 00049 00050 // 00051 // Helper macro GMTL_JOIN: 00052 // The following piece of macro magic joins the two 00053 // arguments together, even when one of the arguments is 00054 // itself a macro (see 16.3.1 in C++ standard). The key 00055 // is that macro expansion of macro arguments does not 00056 // occur in BOOST_DO_JOIN2 but does in BOOST_DO_JOIN. 00057 // 00058 #define GMTL_JOIN( X, Y ) GMTL_DO_JOIN( X, Y ) 00059 #define GMTL_DO_JOIN( X, Y ) GMTL_DO_JOIN2(X,Y) 00060 #define GMTL_DO_JOIN2( X, Y ) X##Y 00061 00062 00064 namespace gmtl 00065 { 00068 00074 template <typename T> 00075 struct Type2Type 00076 { 00077 typedef T OriginalType; 00078 }; 00079 00081 00084 template <class T> inline void ignore_unused_variable_warning(const T&) { } 00085 00087 00088 } // end namespace 00089 #endif