From fede2d31680b9ddf218ccae1c4129ee29923d587 Mon Sep 17 00:00:00 2001 From: Crzyrndm Date: Sat, 21 Jul 2018 12:33:58 +1200 Subject: [PATCH] fix Clang CI warnings --- include/xlnt/utils/optional.hpp | 9 +-------- source/CMakeLists.txt | 1 + 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/include/xlnt/utils/optional.hpp b/include/xlnt/utils/optional.hpp index e019f316..f19bc286 100644 --- a/include/xlnt/utils/optional.hpp +++ b/include/xlnt/utils/optional.hpp @@ -37,15 +37,8 @@ namespace xlnt { template class optional { -#if _MSC_VER <= 1900 // v14, visual studio 2015 +#if defined(_MSC_VER) && _MSC_VER <= 1900 // v14, visual studio 2015 #define XLNT_NOEXCEPT_VALUE_COMPAT(...) (false) - using ctor_copy_T_noexcept = std::false_type; - using ctor_move_T_noexcept = std::false_type; - using copy_ctor_noexcept = ctor_copy_T_noexcept; - using move_ctor_noexcept = ctor_move_T_noexcept; - using set_copy_noexcept_t = std::false_type; - using set_move_noexcept_t = std::false_type; - using clear_noexcept_t = std::false_type; #else #define XLNT_NOEXCEPT_VALUE_COMPAT(...) (__VA_ARGS__) using ctor_copy_T_noexcept = typename std::conditional{}, std::true_type, std::false_type>::type; diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 2ea048d3..11e3593c 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -41,6 +41,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-padded") # ignore padding warnings set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-documentation-unknown-command") # ignore unknown commands in Javadoc-style comments set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unknown-pragmas") # ignore Windows and GCC pragmas + set CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unknown-warning-option") # ignore Windows and GCC pragmas set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-float-equal") # don't warn on uses of == for fp types set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-newline-eof") # no longer an issue with post-c++11 standards which mandate include add a newline if neccesary set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-covered-switch-default") # default is often added to switches for completeness or to cover future alternatives