Skip to content

error: no member named 'max_align_t' in the global namespace #334

@danpolanco

Description

@danpolanco

I think this has to do with this issue:
clang-3.5: once gcc-4.9 and g++-4.9 are installed, clang stops properly building existing projects

I tried adding set (CMAKE_C_COMPILER "/usr/bin/clang") to the catch CMakeLists.txt, but it still output this:

In file included from /data/house_data/human_low_copy/tests/general_test.cpp:2:
In file included from /data/house_data/human_low_copy/build/catch/src/catch/include/catch.hpp:28:
In file included from /data/house_data/human_low_copy/build/catch/src/catch/include/internal/catch_capture.hpp:11:
In file included from /data/house_data/human_low_copy/build/catch/src/catch/include/internal/catch_result_builder.h:91:
In file included from /data/house_data/human_low_copy/build/catch/src/catch/include/internal/catch_expression_lhs.hpp:12:
In file included from /data/house_data/human_low_copy/build/catch/src/catch/include/internal/catch_evaluate.hpp:16:
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/cstddef:51:11: error: no member named 'max_align_t' in the global namespace
using ::max_align_t;
~~^
1 error generated.
make[2]: *** [tests/CMakeFiles/general_test.dir/general_test.cpp.o] Error 1
make[1]: *** [tests/CMakeFiles/general_test.dir/all] Error 2
make: *** [all] Error 2

I also change my alternatives (Ubuntu) for gcc / g++ to 4.8 so that gcc --version && g++ --version both return gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2 and g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2. But it still pops the error up.

Any idea how to get it to use 4.8? Or how I might solve this problem else-how?

Edit:
Btw, I'm sorry if this is the wrong place for this. I thought you guys might have run into this problem already and therefore know a solution. Plus, I want to have this recorded in the issues so if someone else has the same problem, they know how to fix it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions