From 323f7e076acf58269ce1816c617b8037b7e49f8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 2 Apr 2018 00:03:13 +0200 Subject: [PATCH] external: better diagnostics for the std::optional compatiblity test. --- .../Optional/Test/StdOptionalTest.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/MagnumExternal/Optional/Test/StdOptionalTest.cpp b/src/MagnumExternal/Optional/Test/StdOptionalTest.cpp index 3bab115a0..bf0de87bf 100644 --- a/src/MagnumExternal/Optional/Test/StdOptionalTest.cpp +++ b/src/MagnumExternal/Optional/Test/StdOptionalTest.cpp @@ -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() + Debug{} << " header is present"; + #else + Debug{} << " header is not present"; + #endif + #if __has_include() + Debug{} << " header is present"; + #else + Debug{} << " 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);