VladLosev VladLosev - 1 year ago 81
C++ Question

Does GCC have a built-in compile time assert?

Our existing compile-time assert implementation is based on negative array index, and it provides poor diagnostic output on GCC. C++0x's

is a very nice feature, and the diagnostic output it provides is much better. I know GCC has already implemented some C++0x features. Does anyone know if
is among them and if it is then since what GCC version?

Answer Source

According to this page, gcc has had static_assert since 4.3.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download