martinmoene / lest

A modern, C++11-native, single-file header-only, tiny framework for unit-tests, TDD and BDD (includes C++98 variant)
Boost Software License 1.0
390 stars 45 forks source link

Build fails at Travis: no type named 'underlying_type' in namespace 'std' #10

Closed martinmoene closed 9 years ago

martinmoene commented 10 years ago

After adding # pragma clang diagnostic ignored "-Wunused-comparison" to lest.hpp I discovered that the Makefile used by Travis CI didn't build test_lest anymore. After fixing that it appeared that clang trips over std::underlying_type<>, whereas on Windows, g++ (GCC) 4.8.1 and Visual C++ 12 (Visual Studio 2013) succeed.

Edit 27-Sep-2014: test_lest also compiles successfully with clang version 3.6.0 (trunk 218502) created on Windows 8.1 with MinGW/msys/g++.exe (GCC) 4.8.1.

Without further information, I tend to consider the compilation failure of test_lest as a hiccup of clang at Travis.

Moved from issue #9 .

PureAbstract commented 10 years ago

(dropping by from Catch #334 :-) FWIW, I don't see this issue locally on OS X with either current XCode clang (3.5) , or a close-to-tip build of clang3.6 - my guess would be that travis' clang is using gcc's stdlib implementation, rather than libc++ (you can try adding -nostdinc to the clang command line to avoid this)

martinmoene commented 10 years ago

Thanks for the heads-up Andy (@PureAbstract). Will have a look at it (may take some time though).

martinmoene commented 9 years ago

Used this travis configuration by @richoux to compile with g++ 4.8.1 and clang 4.3 with libc++.