CarpetLib does not compile with gcc 4.8 due to static_assert

Issue #1444 closed
Ian Hinder created an issue

Attempting to compile CarpetLib with gcc 4.8 leads to the error

/Users/ian/Cactus/arrangements/Carpet/CarpetLib/src/prolongate_3d_rf2.cc:501:56: error: 'static_assert' was not declared in this scope

I had not come across static_assert before. Apparently it is a C++11 feature. gcc 4.6 was able to compile it, but it looks like gcc 4.8 is stricter. Do we want to require -std=c++11, or should we avoid C++11 features for now?

Keyword:

Comments (4)

  1. Erik Schnetter
    • removed comment

    We need to avoid C++11, it is too early for this. For example, IBM's compilers on Blue Gene/Q do not support it.

    static_assert is handled via autoconf, and is provided by Cactus if the compiler does not support it. You probably need to updated your flesh and/or re-configure.

  2. Ian Hinder reporter
    • changed status to resolved
    • removed comment

    I updated the flesh and the problem went away. I assume due to being detected by autoconf as you said.

  3. Log in to comment