laas / metapod

A template-based robot dynamics library
GNU Lesser General Public License v3.0
14 stars 10 forks source link

choose STATIC_ASSERT implementation automatically #30

Closed sbarthelemy closed 11 years ago

sbarthelemy commented 11 years ago

This commit removes the need for the USE_C11_STATIC_ASSERT option.

This option is annoying because

With this commit the compiler support for C++11-like static assert is inferred from 1) the __cplusplus version 2) the boost config library.

I checked that with gcc 4.6.3 and boost 1.50, it is able to detect when the -std=c++0x is provided or not to gcc.

If such support is detected, it is used.

If it is not available, but boost >1.40 is, boost implementation is used instead.

(Olivier reports that version 1.40 does not work, a link to a changelog or a bug report is welcome).

Otherwise a no-op implementation is defined.

This commit adds a dependancy on boost. Since we will soon depend on boost fusion anyway, I think it is ok.

[1] http://en.wikipedia.org/wiki/C11_%28C_standard_revision%29