﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	revision
373	Compile time assertion	Peter Kovacs	Alpar Juttner	"Compile time assertion would be useful in some cases (instead of LEMON_ASSERT).

A possible solution is the following:
{{{
#!cpp
template <bool> struct STATIC_ASSERT_FAILURE;
template <> struct STATIC_ASSERT_FAILURE<true> {};
template<int x> struct static_assert_test{};

#define LEMON_COMPILE_ASSERT(x) \
   typedef static_assert_test<\
       sizeof(STATIC_ASSERT_FAILURE< (bool)( x ) >)>\
           _static_assert_typedef_
}}}

It could be used like that:
{{{
LEMON_COMPILE_ASSERT(numeric_limits<T>::is_integer);
}}}"	enhancement	new	major	LEMON 1.5 release	core	hg main				
