summaryrefslogtreecommitdiff
path: root/boost/exception/info.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/exception/info.hpp')
-rw-r--r--boost/exception/info.hpp60
1 files changed, 13 insertions, 47 deletions
diff --git a/boost/exception/info.hpp b/boost/exception/info.hpp
index f06df42aaf..f7ac50ecfc 100644
--- a/boost/exception/info.hpp
+++ b/boost/exception/info.hpp
@@ -5,20 +5,21 @@
#ifndef UUID_8D22C4CA9CC811DCAA9133D256D89593
#define UUID_8D22C4CA9CC811DCAA9133D256D89593
-#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
-#pragma GCC system_header
-#endif
-#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
-#pragma warning(push,1)
-#endif
+#include <boost/config.hpp>
#include <boost/exception/exception.hpp>
#include <boost/exception/to_string_stub.hpp>
#include <boost/exception/detail/error_info_impl.hpp>
#include <boost/exception/detail/shared_ptr.hpp>
-#include <boost/config.hpp>
#include <map>
+#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma GCC system_header
+#endif
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(push,1)
+#endif
+
namespace
boost
{
@@ -40,45 +41,6 @@ boost
template <class Tag,class T>
inline
- error_info<Tag,T>::
- error_info( value_type const & value ):
- value_(value)
- {
- }
-
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
- template <class Tag,class T>
- inline
- error_info<Tag,T>::
- error_info( error_info const & x ):
- value_(x.value_)
- {
- }
- template <class Tag,class T>
- inline
- error_info<Tag,T>::
- error_info( value_type && value ) BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR(value_type(std::move(value)))):
- value_(std::move(value))
- {
- }
- template <class Tag,class T>
- inline
- error_info<Tag,T>::
- error_info( error_info && x ) BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR(value_type(std::move(x.value_)))):
- value_(std::move(x.value_))
- {
- }
-#endif
-
- template <class Tag,class T>
- inline
- error_info<Tag,T>::
- ~error_info() throw()
- {
- }
-
- template <class Tag,class T>
- inline
std::string
error_info<Tag,T>::
name_value_string() const
@@ -180,7 +142,11 @@ boost
refcount_ptr<error_info_container> p;
error_info_container_impl * c=new error_info_container_impl;
p.adopt(c);
- c->info_ = info_;
+ for( error_info_map::const_iterator i=info_.begin(),e=info_.end(); i!=e; ++i )
+ {
+ shared_ptr<error_info_base> cp(i->second->clone());
+ c->info_.insert(std::make_pair(i->first,cp));
+ }
return p;
}
};