Browse Source

external: better diagnostics for the std::optional compatiblity test.

pull/233/head
Vladimír Vondruš 8 years ago
parent
commit
323f7e076a
  1. 15
      src/MagnumExternal/Optional/Test/StdOptionalTest.cpp

15
src/MagnumExternal/Optional/Test/StdOptionalTest.cpp vendored

@ -55,6 +55,21 @@ StdOptionalTest::StdOptionalTest() {
#endif
void StdOptionalTest::conversion() {
Debug{} << "Using C++ version" << CORRADE_CXX_STANDARD;
#ifdef __has_include
Debug{} << "__has_include is supported";
#if __has_include(<optional>)
Debug{} << "<optional> header is present";
#else
Debug{} << "<optional> header is not present";
#endif
#if __has_include(<experimental/optional>)
Debug{} << "<experimental/optional> header is present";
#else
Debug{} << "<experimental/optional> header is not present";
#endif
#else
Debug{} << "__has_include is not supported";
#endif
#ifdef _MAGNUM_HAS_STD_OPTIONAL
Debug{} << "Using a conversion to std::optional, C++17 should be present";
CORRADE_VERIFY(CORRADE_CXX_STANDARD >= 201703L);

Loading…
Cancel
Save