From 617e4b8520e4862870a73552e95d4e591284c701 Mon Sep 17 00:00:00 2001 From: Jay Krell Date: Wed, 20 Oct 2021 17:56:37 -0700 Subject: [PATCH] Fix to compile with newer Visual C++, such as 16.11, and /Zc:implicitNoexcept-. Otherwise gets: Error C2694 'override': overriding virtual function has less restrictive exception specification than base class virtual member function 'base' Similar changes are being made e.g.: https://github.com/boostorg/json/pull/636 --- include/boost/iostreams/filtering_stream.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/boost/iostreams/filtering_stream.hpp b/include/boost/iostreams/filtering_stream.hpp index 8621ef96b..79caf5504 100644 --- a/include/boost/iostreams/filtering_stream.hpp +++ b/include/boost/iostreams/filtering_stream.hpp @@ -93,6 +93,9 @@ class filtering_stream_base typename Chain::char_type, typename Chain::traits_type >::stream_type stream_type; + + BOOST_DEFAULTED_FUNCTION(~filtering_stream_base() BOOST_NOEXCEPT, { }) + filtering_stream_base() : stream_type(0) { this->set_chain(&chain_); } private: void notify() { this->rdbuf(chain_.empty() ? 0 : &chain_.front()); }