Jpp - the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JResolve.hh
Go to the documentation of this file.
1 #ifndef __JLANG__JRESOLVE__
2 #define __JLANG__JRESOLVE__
3 
4 #include "JLang/JBool.hh"
5 
6 
7 /**
8  * \author mdejong
9  */
10 
11 namespace JLANG {}
12 namespace JPP { using namespace JLANG; }
13 
14 namespace JLANG {
15 
16 
17  /**
18  * Test exitence of class T.
19  */
20  template<class T, class JBool_t = JBool<true> >
21  struct JResolve
22  {
23  static const bool value = false; //!< true if an implementation of class T exists; else false
24  };
25 
26 
27  /**
28  * Template specialisation of class JResolve for existing implementation of given class T.
29  */
30  template<class T>
31  struct JResolve<T, JBool< sizeof(T) > >
32  {
33  static const bool value = true; //!< true if an implementation of class T exists; else false
34  };
35 }
36 
37 #endif
Test exitence of class T.
Definition: JResolve.hh:21
Auxiliary template class for type bool.
Definition: JBool.hh:20
do set_variable OUTPUT_DIRECTORY $WORKDIR T
static const bool value
true if an implementation of class T exists; else false
Definition: JResolve.hh:23