Ticket #2343: boost_exception2.patch

File boost_exception2.patch, 1.5 KB (added by Nicola Musatti, 14 years ago)
  • exception.hpp

     
    66#ifndef UUID_274DA366004E11DCB1DDFE2E56D89593
    77#define UUID_274DA366004E11DCB1DDFE2E56D89593
    88
     9#include <boost/config.hpp>
     10
    911namespace
    1012boost
    1113    {
     
    313315    exception_detail::enable_error_info_return_type<T>::type
    314316    enable_error_info( T const & x )
    315317        {
    316         return typename exception_detail::enable_error_info_return_type<T>::type(x);
     318        return BOOST_CTOR_TYPENAME exception_detail::enable_error_info_return_type<T>::type(x);
    317319        }
    318320
    319321    ////////////////////////////////////////////////////////////////////////
  • get_error_info.hpp

     
    1010#include <boost/exception/detail/error_info_impl.hpp>
    1111#include <boost/exception/detail/type_info.hpp>
    1212#include <boost/shared_ptr.hpp>
     13#include <boost/detail/workaround.hpp>
    1314#include <string.h>
    1415
    1516namespace
     
    4243                {
    4344                size_t n=1+strlen(s);
    4445                char * str = new char[n];
     46#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610))
     47                (void) ::std::memcpy(str,s,n);
     48#else
    4549                (void) memcpy(str,s,n);
     50#endif
    4651                return str;
    4752                }
    4853            };