From 8310c9831fad9963012353572e51c30740bc3942 Mon Sep 17 00:00:00 2001 From: Emil Dotchevski Date: Tue, 2 Sep 2008 23:13:06 +0000 Subject: [PATCH] bug fix in the decoupling of info.hpp from get_error_info.hpp. [SVN r48551] --- ...rror_info_base.hpp => error_info_impl.hpp} | 26 ++++++++ include/boost/exception/get_error_info.hpp | 2 +- include/boost/exception/info.hpp | 64 ++++++++----------- 3 files changed, 55 insertions(+), 37 deletions(-) rename include/boost/exception/detail/{error_info_base.hpp => error_info_impl.hpp} (59%) diff --git a/include/boost/exception/detail/error_info_base.hpp b/include/boost/exception/detail/error_info_impl.hpp similarity index 59% rename from include/boost/exception/detail/error_info_base.hpp rename to include/boost/exception/detail/error_info_impl.hpp index d6011a8..7a57b8b 100644 --- a/include/boost/exception/detail/error_info_base.hpp +++ b/include/boost/exception/detail/error_info_impl.hpp @@ -30,6 +30,32 @@ boost } }; } + + template + class + error_info: + public exception_detail::error_info_base + { + public: + + typedef T value_type; + + error_info( value_type const & value ); + ~error_info() throw(); + + value_type const & + value() const + { + return value_; + } + + private: + + char const * tag_typeid_name() const; + std::string value_as_string() const; + + value_type const value_; + }; } #endif diff --git a/include/boost/exception/get_error_info.hpp b/include/boost/exception/get_error_info.hpp index 87047bf..dac239c 100644 --- a/include/boost/exception/get_error_info.hpp +++ b/include/boost/exception/get_error_info.hpp @@ -7,7 +7,7 @@ #define UUID_1A590226753311DD9E4CCF6156D89593 #include -#include +#include #include #include #include diff --git a/include/boost/exception/info.hpp b/include/boost/exception/info.hpp index 0823cd2..fbe6d68 100644 --- a/include/boost/exception/info.hpp +++ b/include/boost/exception/info.hpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include @@ -16,45 +16,37 @@ namespace boost { template - class - error_info: - public exception_detail::error_info_base + inline + error_info:: + error_info( value_type const & value ): + value_(value) { - public: + } - typedef T value_type; + template + inline + error_info:: + ~error_info() throw() + { + } - error_info( value_type const & value ): - value_(value) - { - } + template + inline + char const * + error_info:: + tag_typeid_name() const + { + return type_name(); + } - ~error_info() throw() - { - } - - value_type const & - value() const - { - return value_; - } - - private: - - char const * - tag_typeid_name() const - { - return type_name(); - } - - std::string - value_as_string() const - { - return to_string_stub(value_); - } - - value_type const value_; - }; + template + inline + std::string + error_info:: + value_as_string() const + { + return to_string_stub(value_); + } namespace exception_detail