Ticket #4360: enable_error_info_CodeGear2010.patch
File enable_error_info_CodeGear2010.patch, 1.8 KB (added by , 12 years ago) |
---|
-
boost/exception/info.hpp
17 17 #include <boost/exception/detail/error_info_impl.hpp> 18 18 #include <boost/shared_ptr.hpp> 19 19 #include <boost/config.hpp> 20 #include <boost/detail/workaround.hpp> 20 21 #include <map> 21 22 22 23 namespace … … 192 193 { 193 194 return exception_detail::set_info(x,v); 194 195 } 196 197 #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x621) ) 198 // Workaround to avoid a Borland/CodeGear error, "Error E2316: 'data_' is not 199 // a member of 'ostream' in function set_info<ostream,tag_test_int,int>(...)" 200 template <class Tag,class T> 201 inline 202 char 203 operator<<( ::std::ostream const & , ::boost::error_info<Tag,T> const & ); 204 #endif 195 205 } 196 206 197 207 #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) -
libs/exception/test/enable_error_info_test.cpp
8 8 #include <boost/exception/info.hpp> 9 9 #include <boost/exception/diagnostic_information.hpp> 10 10 #include <boost/detail/lightweight_test.hpp> 11 #include <boost/detail/workaround.hpp> 11 12 12 13 namespace 13 14 { 15 #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x621) ) 16 // Working around a compiler bug reported at Embarcadero C++Builder Report #85504, 17 // "typeid (pointer to incomplete type) triggers link error: Unresolved external" 18 // http://qc.embarcadero.com/wc/qcmain.aspx?d=85504 19 struct tag_test_int {}; 20 #endif 21 14 22 typedef boost::error_info<struct tag_test_int,int> test_int; 15 23 16 24 void