MEL
Microthread & Execution library
StaticAssert.h
1 #pragma once
2 
3 namespace mel
4 {
5  namespace mpl
6  {
7 
17  template <bool b>
18  struct StaticAssert
19  {
20  StaticAssert(...){};
22  inline void dummy() {}
23  };
24  template <>
25  struct StaticAssert<false>
26  {
28  inline void dummy() {}
29  };
30  #ifndef NDEBUG
31  #define MPL_STATIC_ASSERT( value, msg ) \
32  do { \
33  struct ERROR_##msg{}; \
34  typedef mel::mpl::StaticAssert<value> AuxT; \
35  AuxT aux = AuxT( ERROR_##msg()); \
36  aux.dummy(); \
37  } while(0)
38  #else
39  #define MPL_STATIC_ASSERT( value, msg ) \
40  do{ } while( 0 )
41  #endif
42  }
43 }
Definition: Callback_Impl.h:11
void dummy()
Definition: StaticAssert.h:28
Definition: StaticAssert.h:19
void dummy()
Definition: StaticAssert.h:22