Skip to content

Commit

Permalink
Fix to compile with newer Visual C++, such as 16.11, and
Browse files Browse the repository at this point in the history
/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.:
    boostorg/json#636

  And proposed here:
    boostorg/iostreams#136

I grant there there could be more of this.
These two are just enough for our codebase.
  • Loading branch information
jaykrell committed Jul 12, 2024
1 parent 9c6964a commit a3368d3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/boost/format/alt_sstream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ namespace boost {
typedef basic_altstringbuf<Ch, Tr, Alloc> stringbuf_t;
public:
typedef Alloc allocator_type;

BOOST_DEFAULTED_FUNCTION(~basic_oaltstringstream() BOOST_NOEXCEPT, { })

basic_oaltstringstream()
: pbase_type(new stringbuf_t), stream_t(pbase_type::member.get())
{ }
Expand Down

0 comments on commit a3368d3

Please sign in to comment.