summaryrefslogtreecommitdiffstats
path: root/external/boost
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-08-09 11:36:21 +0200
committerStephan Bergmann <sbergman@redhat.com>2018-08-09 13:26:11 +0200
commitd84bf553afa510e5c674817fa480ac0af62e4945 (patch)
treeb54612c7d912df0f78018be5cacc31838015d69b /external/boost
parenttdf#101254: Enable arrowheads in sidebar for draws (diff)
downloadcore-d84bf553afa510e5c674817fa480ac0af62e4945.tar.gz
core-d84bf553afa510e5c674817fa480ac0af62e4945.zip
Silence external/boost deprecated std::iterator warnings with MSVC 2017
At least cl version 19.14.26433 generates such warning C4996 now. While the one about the using declaration in boost/iterator.hpp looks somewhat bogus, the one in boost/circular_buffer/details.hpp is about an actual use of std::iterator as a base class in Boost-internal code. If further such places in external/boost crop up that need fixing, an alternative approach could be to extend the external/boost/include/ wrappers to be also used with MSVC. (Globally setting _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING has avoided, as it also finds uses in our own code that should be fixed, like 58222feb7fee0c08fb54b9ee29f8f0674c5cf508 "warning STL4015: std::iterator is deprecated (clang-cl)".) Change-Id: I6a41421a590fcee57b4ac8bcb7c3631fdfdecb81 Reviewed-on: https://gerrit.libreoffice.org/58755 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'external/boost')
-rw-r--r--external/boost/UnpackedTarball_boost.mk2
-rw-r--r--external/boost/msvc2017.patch.039
2 files changed, 41 insertions, 0 deletions
diff --git a/external/boost/UnpackedTarball_boost.mk b/external/boost/UnpackedTarball_boost.mk
index 0b6b5eb6f956..f23fe6553529 100644
--- a/external/boost/UnpackedTarball_boost.mk
+++ b/external/boost/UnpackedTarball_boost.mk
@@ -40,6 +40,8 @@ boost_patches += windows-no-utf8-locales.patch.0
boost_patches += gcc9.patch.0
+boost_patches += msvc2017.patch.0
+
$(eval $(call gb_UnpackedTarball_UnpackedTarball,boost))
$(eval $(call gb_UnpackedTarball_set_tarball,boost,$(BOOST_TARBALL)))
diff --git a/external/boost/msvc2017.patch.0 b/external/boost/msvc2017.patch.0
new file mode 100644
index 000000000000..a032557542c9
--- /dev/null
+++ b/external/boost/msvc2017.patch.0
@@ -0,0 +1,39 @@
+--- boost/circular_buffer/details.hpp
++++ boost/circular_buffer/details.hpp
+@@ -216,12 +216,19 @@
+ // Helper types
+
+ //! Base iterator.
++#if defined _MSC_VER && !defined __clang__ && _MSC_VER == 1914
++#pragma warning(push)
++#pragma warning(disable: 4996)
++#endif
+ typedef std::iterator<
+ std::random_access_iterator_tag,
+ typename Traits::value_type,
+ typename Traits::difference_type,
+ typename Traits::pointer,
+ typename Traits::reference> base_iterator;
++#if defined _MSC_VER && !defined __clang__ && _MSC_VER == 1914
++#pragma warning(pop)
++#endif
+
+ //! Non-const iterator.
+ typedef iterator<Buff, typename Traits::nonconst_self> nonconst_self;
+--- boost/iterator.hpp
++++ boost/iterator.hpp
+@@ -13,7 +13,14 @@
+ namespace boost
+ {
+
++#if defined _MSC_VER && !defined __clang__ && _MSC_VER == 1914
++#pragma warning(push)
++#pragma warning(disable: 4996)
++#endif
+ using std::iterator;
++#if defined _MSC_VER && !defined __clang__ && _MSC_VER == 1914
++#pragma warning(pop)
++#endif
+
+ } // namespace boost
+