From c73ad4707ac1d8ced279abd7eb7713f6300a676a Mon Sep 17 00:00:00 2001 From: khizmax Date: Wed, 8 Mar 2017 11:36:31 +0300 Subject: [PATCH 1/1] Fixed VC 2017 warning --- cds/compiler/vc/defs.h | 11 ++++++++--- cds/details/marked_ptr.h | 4 ++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/cds/compiler/vc/defs.h b/cds/compiler/vc/defs.h index 7d0b382d..4778ec59 100644 --- a/cds/compiler/vc/defs.h +++ b/cds/compiler/vc/defs.h @@ -36,10 +36,11 @@ #define CDS_COMPILER_VERSION _MSC_VER // Compiler name -// Supported compilers: MS VC 2013 +// Supported compilers: MS VC 2013 + // C++ compiler versions: -#define CDS_COMPILER_MSVC12 1800 // 2013 vc12 -#define CDS_COMPILER_MSVC14 1900 // 2015 vc14 +#define CDS_COMPILER_MSVC12 1800 // 2013 vc12 +#define CDS_COMPILER_MSVC14 1900 // 2015 vc14 +#define CDS_COMPILER_MSVC14_1 1910 // 2017 vc14.1 #if CDS_COMPILER_VERSION < CDS_COMPILER_MSVC12 # error "Only MS Visual C++ 12 (2013) Update 4 and above is supported" @@ -53,6 +54,10 @@ # define CDS_COMPILER__NAME "MS Visual C++ 2015" # define CDS_COMPILER__NICK "vc14" # define CDS_COMPILER_LIBCDS_SUFFIX "vcv140" +#elif _MSC_VER == 1910 +# define CDS_COMPILER__NAME "MS Visual C++ 2017" +# define CDS_COMPILER__NICK "vc141" +# define CDS_COMPILER_LIBCDS_SUFFIX "vcv141" #else # define CDS_COMPILER__NAME "MS Visual C++" # define CDS_COMPILER__NICK "msvc" diff --git a/cds/details/marked_ptr.h b/cds/details/marked_ptr.h index db70507b..2a53c34c 100644 --- a/cds/details/marked_ptr.h +++ b/cds/details/marked_ptr.h @@ -374,8 +374,8 @@ CDS_CXX11_ATOMIC_BEGIN_NAMESPACE atomic(const atomic&) = delete; atomic& operator=(const atomic&) = delete; -#if !(CDS_COMPILER == CDS_COMPILER_MSVC && CDS_COMPILER_VERSION <= CDS_COMPILER_MSVC14) - // MSVC12, MSVC14: warning C4522: multiple assignment operators specified +#if !(CDS_COMPILER == CDS_COMPILER_MSVC && CDS_COMPILER_VERSION <= CDS_COMPILER_MSVC14_1) + // MSVC12, MSVC14, MSVC14.1: warning C4522: multiple assignment operators specified atomic& operator=(const atomic&) volatile = delete; marked_ptr operator=(marked_ptr val) volatile CDS_NOEXCEPT { -- 2.34.1