[ 
https://issues.apache.org/jira/browse/ARROW-1836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16265870#comment-16265870
 ] 

ASF GitHub Bot commented on ARROW-1836:
---------------------------------------

wesm closed pull request #1359: ARROW-1836: [C++] Remove deprecated 
static_visitor struct to avoid msvc C4996 warning
URL: https://github.com/apache/arrow/pull/1359
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/cpp/cmake_modules/SetupCxxFlags.cmake 
b/cpp/cmake_modules/SetupCxxFlags.cmake
index 6b0974b3d..4b1950f7a 100644
--- a/cpp/cmake_modules/SetupCxxFlags.cmake
+++ b/cpp/cmake_modules/SetupCxxFlags.cmake
@@ -68,9 +68,6 @@ if ("${UPPERCASE_BUILD_WARNING_LEVEL}" STREQUAL "CHECKIN")
     set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} /W3")
     # Treat all compiler warnings as errors
     set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} /WX")
-
-    # MSVC version of -Wno-deprecated
-    set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} /wd4996")
   elseif ("${COMPILER_FAMILY}" STREQUAL "clang")
     set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Weverything -Wno-c++98-compat \
 -Wno-c++98-compat-pedantic -Wno-deprecated -Wno-weak-vtables -Wno-padded \
@@ -118,9 +115,6 @@ elseif ("${UPPERCASE_BUILD_WARNING_LEVEL}" STREQUAL 
"EVERYTHING")
     # /wdnnnn disables a warning where "nnnn" is a warning number
     # Treat all compiler warnings as errors
     set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS}  /WX")
-
-    # MSVC version of -Wno-deprecated
-    set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} /wd4996")
   elseif ("${COMPILER_FAMILY}" STREQUAL "clang")
     set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Weverything -Wno-c++98-compat 
-Wno-c++98-compat-pedantic")
     # Treat all compiler warnings as errors
@@ -140,9 +134,6 @@ else()
     # /wdnnnn disables a warning where "nnnn" is a warning number
     string(REPLACE "/W3" "" CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS}")
     set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} /W3")
-
-    # MSVC version of -Wno-deprecated
-    set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} /wd4996")
   elseif ("${COMPILER_FAMILY}" STREQUAL "clang")
     set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wall")
   elseif ("${COMPILER_FAMILY}" STREQUAL "gcc")
diff --git a/cpp/src/arrow/util/variant.h b/cpp/src/arrow/util/variant.h
index 923a8685f..9bfc52cb1 100644
--- a/cpp/src/arrow/util/variant.h
+++ b/cpp/src/arrow/util/variant.h
@@ -101,16 +101,6 @@ class bad_variant_access : public std::runtime_error
 
 }; // class bad_variant_access
 
-template <typename R = void>
-struct ARROW_VARIANT_DEPRECATED static_visitor
-{
-    using result_type = R;
-
-protected:
-    static_visitor() {}
-    ~static_visitor() {}
-};
-
 #if !defined(ARROW_VARIANT_MINIMIZE_SIZE)
 using type_index_t = unsigned int;
 #else


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> [C++] Fix C4996 warning from arrow/util/variant.h on MSVC builds
> ----------------------------------------------------------------
>
>                 Key: ARROW-1836
>                 URL: https://issues.apache.org/jira/browse/ARROW-1836
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: C++
>            Reporter: Wes McKinney
>            Assignee: Max Risuhin
>              Labels: pull-request-available
>             Fix For: 0.8.0
>
>
> [~Max Risuhin] can you look into this? This is leaking into downstream users 
> of Arrow. see e.g. 
> https://github.com/apache/parquet-cpp/pull/403/commits/8e40b7d7d8f161a14dfed70cb6d528e82ffa21a9
>  and build failures 
> https://ci.appveyor.com/project/ApacheSoftwareFoundation/parquet-cpp/build/1.0.443



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to