------- Comment #7 from ich at az2000 dot de 2009-03-15 00:58 ------- Hm yea, I thought already about that. But I cannot think of a good (and easy) definition when an assert() should be checked at compile time and whether not. And thus, I am not sure if that is something which belongs into the C++ standard itself.
That is why I thought it would be the best to let the compiler do such a check if possible (and that pretty much depends on the cleverness of the compiler) and to just accept the situation that there could be cases where the value could be known in theory already at compile time but the compiler doesn't catch that. static asserts are different again (and I don't think there are of no use). There is a common intersection between what I want and what static asserts would offer but this intersection is small and they will not really solve the issue that it would be still very nice if the compiler could check asserts at compile time if possible (and in that case, I think that static asserts are only of little use; but it's of course hard to tell that, also because if not all compiler supports compile-time checks on asserts, a lot of people will use static asserts as a semi-alternative). But I could also just be wrong with these thoughts. I am not really into the GCC development and even after about 5 years of C++ development, I still see more and more new and different ways of doing stuff in C++. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39462