Jpp test-rotations-new
the software that should make you happy
Loading...
Searching...
No Matches
JResolve.hh
Go to the documentation of this file.
1#ifndef __JLANG__JRESOLVE__
2#define __JLANG__JRESOLVE__
3
4#include <type_traits>
5
6/**
7 * \author mdejong
8 */
9
10namespace JLANG {}
11namespace JPP { using namespace JLANG; }
12
13namespace JLANG {
14
15 /**
16 * Test existence of class T.
17 */
18 template<class T>
20 {
21 template<class U> static auto exists(U*) -> decltype(sizeof(U) >= 0);
22 template<typename> static auto exists(...) -> std::false_type;
23
24 public:
25 static const bool value = std::is_same<bool, decltype(exists<T>(0))>::value; //!< true if an implementation of class T exists; else false
26 };
27}
28
29#endif
Test existence of class T.
Definition JResolve.hh:20
static const bool value
true if an implementation of class T exists; else false
Definition JResolve.hh:25
static auto exists(U *) -> decltype(sizeof(U) >=0)
static auto exists(...) -> std::false_type
Auxiliary classes and methods for language specific functionality.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).