edouarda / brigand

Instant compile time C++ 11 metaprogramming library
Boost Software License 1.0
572 stars 48 forks source link

is_set() tests fail with clang on windows #261

Open emptywalls opened 6 years ago

emptywalls commented 6 years ago

error: static_assert failed due to requirement '!brigand::is_set<int, int>::value' "error in brigand::is_set" static_assert(!brigand::is_set<int, int>::value, "error in brigand::is_set"); ^ ~~~~~~~~~ error: static_assert failed due to requirement 'brigand::is_set<void, int &, int>::value' "error in brigand::is_set" static_assert(brigand::is_set<void, int&, int>::value, "error in brigand::is_set"); ^ ~~~~~~~~~~~ error: static_assert failed due to requirement 'brigand::is_set<void, const int, int>::value' "error in brigand::is_set" static_assert(brigand::is_set<void, const int, int>::value, "error in brigand::is_set"); ^ ~~~~~~~~~~~~ error: static_assert failed due to requirement 'brigand::is_set<int, short, double>::value' "error in brigand::is_set" static_assert(brigand::is_set<int, short, double>::value, "error in brigand::is_set"); ^ ~~~~~~~~~~ error: static_assert failed due to requirement 'brigand::is_set<int, short, double, float>::value' "error in brigand::is_set" static_assert(brigand::is_set<int, short, double, float>::value, "error in brigand::is_set"); ^ ~~~~~~~~~~~~~ error: static_assert failed due to requirement 'brigand::is_set<int, void, int &>::value' "error in brigand::is_set" static_assert(brigand::is_set<int, void, int&>::value, "error in brigand::is_set"); ^ ~~~~~~~

clang-cl.exe --version clang version 7.0.0 (trunk 328716)

define BRIGAND_COMP_MSVC fixes the problem.

In particular I have encountered this using chromiums build environment since they moved to clang on windows.

edouarda commented 6 years ago

It's clang on which platform?

emptywalls commented 6 years ago

clang-cl.exe --version clang version 7.0.0 (trunk 328716) Target: x86_64-pc-windows-msvc

emptywalls commented 6 years ago

Also as I already mentioned I encountered this in chromiums build environment which has a rather lengthy list of compiler switches applied. The error very well may be due to clangs compatibility to msvc, I have not looked closely.

edouarda commented 6 years ago

That may be the case as I think we only test Clang on Mac and Linux.