Compare commits

..

7 Commits

Author SHA1 Message Date
e5e4652b75 Merge remote-tracking branch 'origin/develop' 2014-08-29 17:51:11 -07:00
38bfc39d10 Merge pull request #4 from Lastique/develop
Port to Boost.Core demangle() and typeinfo. Thanks Lastique.
2014-06-11 11:33:04 -07:00
5dea76a301 Port to Boost.Core demangle() and typeinfo. 2014-06-11 22:02:59 +04:00
8931eb2e0d Merge pull request #1 from Lastique/develop
Re-enable type name demangling (thanks Lastique)
2014-06-04 23:29:56 -07:00
a129725e3e Switched from BOOST_ATTRIBUTE_NORETURN to BOOST_NORETURN. 2014-06-05 00:50:04 +04:00
8f097eb241 Comment fix. 2014-05-31 21:57:51 +04:00
7062572c8f Re-implemented type name demangling.
The new implementation does not depend on Boost.Units and is fully contained in Boost.Exception.
2014-05-31 21:54:52 +04:00
3 changed files with 15 additions and 17 deletions

View File

@ -21,9 +21,9 @@
#include <boost/exception/diagnostic_information.hpp>
#include <boost/exception/detail/type_info.hpp>
#include <boost/exception/detail/clone_current_exception.hpp>
//#ifndef BOOST_NO_RTTI
//#include <boost/units/detail/utility.hpp>
//#endif
#ifndef BOOST_NO_RTTI
#include <boost/core/demangle.hpp>
#endif
#include <boost/shared_ptr.hpp>
#include <stdexcept>
#include <new>
@ -92,7 +92,7 @@ boost
std::string
to_string( original_exception_type const & x )
{
return /*units::detail::demangle*/(x.value()->name());
return core::demangle(x.value()->name());
}
#endif

View File

@ -12,12 +12,10 @@
#pragma warning(push,1)
#endif
#include <boost/detail/sp_typeinfo.hpp>
#include <boost/core/typeinfo.hpp>
#include <boost/core/demangle.hpp>
#include <boost/current_function.hpp>
#include <boost/config.hpp>
//#ifndef BOOST_NO_TYPEID
//#include <boost/units/detail/utility.hpp>
//#endif
#include <string>
namespace
@ -31,7 +29,7 @@ boost
#ifdef BOOST_NO_TYPEID
return BOOST_CURRENT_FUNCTION;
#else
return /*units::detail::demangle*/(typeid(T*).name());
return core::demangle(typeid(T*).name());
#endif
}
@ -43,7 +41,7 @@ boost
#ifdef BOOST_NO_TYPEID
return BOOST_CURRENT_FUNCTION;
#else
return /*units::detail::demangle*/(typeid(T).name());
return core::demangle(typeid(T).name());
#endif
}
@ -53,10 +51,10 @@ boost
struct
type_info_
{
detail::sp_typeinfo const * type_;
core::typeinfo const * type_;
explicit
type_info_( detail::sp_typeinfo const & type ):
type_info_( core::typeinfo const & type ):
type_(&type)
{
}
@ -71,7 +69,7 @@ boost
}
}
#define BOOST_EXCEPTION_STATIC_TYPEID(T) ::boost::exception_detail::type_info_(BOOST_SP_TYPEID(T))
#define BOOST_EXCEPTION_STATIC_TYPEID(T) ::boost::exception_detail::type_info_(BOOST_CORE_TYPEID(T))
#ifndef BOOST_NO_RTTI
#define BOOST_EXCEPTION_DYNAMIC_TYPEID(x) ::boost::exception_detail::type_info_(typeid(x))

View File

@ -16,9 +16,9 @@
#include <boost/exception/get_error_info.hpp>
#include <boost/exception/info.hpp>
#include <boost/utility/enable_if.hpp>
//#ifndef BOOST_NO_RTTI
//#include <boost/units/detail/utility.hpp>
//#endif
#ifndef BOOST_NO_RTTI
#include <boost/core/demangle.hpp>
#endif
#include <exception>
#include <sstream>
#include <string>
@ -151,7 +151,7 @@ boost
#ifndef BOOST_NO_RTTI
if ( verbose )
tmp << std::string("Dynamic exception type: ") <<
/*units::detail::demangle*/((be?(BOOST_EXCEPTION_DYNAMIC_TYPEID(*be)):(BOOST_EXCEPTION_DYNAMIC_TYPEID(*se))).type_->name()) << '\n';
core::demangle((be?(BOOST_EXCEPTION_DYNAMIC_TYPEID(*be)):(BOOST_EXCEPTION_DYNAMIC_TYPEID(*se))).type_->name()) << '\n';
#endif
if( with_what && se && verbose )
tmp << "std::exception::what: " << wh << '\n';