mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
fix Clang CI warnings
This commit is contained in:
parent
ad24d9485d
commit
fede2d3168
|
@ -37,15 +37,8 @@ namespace xlnt {
|
|||
template <typename T>
|
||||
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::is_nothrow_copy_constructible<T>{}, std::true_type, std::false_type>::type;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user