Jpp test-rotations-new
the software that should make you happy
Loading...
Searching...
No Matches
JConstructor.hh
Go to the documentation of this file.
1#ifndef __JLANG__JCONSTRUCTOR__
2#define __JLANG__JCONSTRUCTOR__
3
4#include <utility>
5
6#include "JLang/JTest.hh"
7
8/**
9 * \author mdejong
10 */
11
12namespace JLANG {}
13namespace JPP { using namespace JLANG; }
14
15namespace JLANG {
16
17 /**
18 * Template class test for availability of a suitable constructor <tt>JType_t(const JArgument_t)</tt>.
19 */
20 template<class JType_t, class JArgument_t>
22 public JTest
23 {
24 using JTest::test;
25
26 static JTrue test(const JType_t&);
27
28 public:
29 static const bool has_constructor = JTEST(test(std::declval<JArgument_t>())); //!< true if JType_t can be constructed from JArgument_t; else false
30 };
31}
32
33#endif
#define JTEST(__A__)
Test macro.
Definition JTest.hh:45
Template class test for availability of a suitable constructor JType_t(const JArgument_t).
static const bool has_constructor
true if JType_t can be constructed from JArgument_t; else false
static JTrue test(const JType_t &)
Auxiliary classes and methods for language specific functionality.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
definition of true
Definition JTest.hh:24
Auxiliary base class for compile time evaluation of test.
Definition JTest.hh:21
static JFalse test(...)
default false