Jpp  18.0.0-rc.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JAbstractClass.hh
Go to the documentation of this file.
1 #ifndef __JLANG__JABSTRACTCLASS__
2 #define __JLANG__JABSTRACTCLASS__
3 
4 #include "JLang/JTest.hh"
5 
6 /**
7  * \author mdejong
8  */
9 
10 namespace JLANG {}
11 namespace JPP { using namespace JLANG; }
12 
13 namespace JLANG {
14 
15  /**
16  * Template class test for abstractness.
17  */
18  template<class T>
20  public JTest
21  {
22  using JTest::test;
23 
24  template<class U>
25  static JTrue test(U (*)[1]);
26 
27  public:
28  static const bool is_abstract = !JTEST(test<T>(0)); //!< true of class is abstract; else false
29  };
30 }
31 
32 #endif
static JTrue test(U(*)[1])
#define JTEST(__A__)
Test macro.
Definition: JTest.hh:45
static JFalse test(...)
default false
Template class test for abstractness.
Auxiliary base class for compile time evaluation of test.
Definition: JTest.hh:21
definition of true
Definition: JTest.hh:24
static const bool is_abstract
true of class is abstract; else false