Ticket #5731: boost-1.47.0-exceptions.patch

File boost-1.47.0-exceptions.patch, 897 bytes (added by pmachata@…, 6 years ago)

Proposed fix

  • boost/numeric/conversion/converter_policies.hpp

    diff -up boost/numeric/conversion/converter_policies.hpp\~ boost/numeric/conversion/converter_policies.hpp
    old new  
    2020
    2121#include "boost/mpl/if.hpp"
    2222#include "boost/mpl/integral_c.hpp"
     23#include "boost/throw_exception.hpp"
    2324
    2425namespace boost { namespace numeric
    2526{
    struct def_overflow_handler 
    159160  void operator() ( range_check_result r ) // throw(negative_overflow,positive_overflow)
    160161  {
    161162    if ( r == cNegOverflow )
    162       throw negative_overflow() ;
     163      boost::throw_exception( negative_overflow() ) ;
    163164    else if ( r == cPosOverflow )
    164            throw positive_overflow() ;
     165      boost::throw_exception( positive_overflow() ) ;
    165166  }
    166167} ;
    167168