#ifndef _IV_STATICASSERT_H_ #define _IV_STATICASSERT_H_ namespace iv { namespace detail { template struct StaticAssertFailure; template<> struct StaticAssertFailure { enum { value = 1 }; }; template struct StaticAssertTest { }; } } // namespace iv::detail #ifndef IV_CONCAT #define IV_CONCAT1(x, y) x##y #define IV_CONCAT(x, y) IV_CONCAT1(x, y) #endif // IV_CONCAT #define IV_STATIC_ASSERT(cond)\ typedef ::iv::detail::StaticAssertTest\ (cond)>)>\ IV_CONCAT(StaticAssertTypedef, __LINE__) #endif // _IV_STATICASSERT_H_