From 6dfb175cefd9b53f9da905bdaf75a621821e39f2 Mon Sep 17 00:00:00 2001 From: joaquintides Date: Tue, 31 Aug 2021 19:19:57 +0200 Subject: [PATCH] supressed spurious type-limits warning See https://github.com/boostorg/iterator/pull/66 for details. --- include/boost/iterator/advance.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/boost/iterator/advance.hpp b/include/boost/iterator/advance.hpp index 92af8fb..2b74256 100644 --- a/include/boost/iterator/advance.hpp +++ b/include/boost/iterator/advance.hpp @@ -8,6 +8,7 @@ #define BOOST_ITERATOR_ADVANCE_HPP #include +#include #include namespace boost { @@ -28,6 +29,12 @@ namespace iterators { } } +#if BOOST_WORKAROUND(BOOST_GCC_VERSION, >= 40600) +// type-limits warning issued below when n is an unsigned integral +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtype-limits" +#endif + template inline BOOST_CXX14_CONSTEXPR void advance_impl( @@ -50,6 +57,10 @@ namespace iterators { } } +#if BOOST_WORKAROUND(BOOST_GCC_VERSION, >= 40600) +#pragma GCC diagnostic pop +#endif + template inline BOOST_CXX14_CONSTEXPR void advance_impl(