2010-02-01 00:25:15 +00:00
|
|
|
//Copyright (c) 2006-2010 Emil Dotchevski and Reverge Studios, Inc.
|
2008-08-28 23:49:55 +00:00
|
|
|
|
|
|
|
//Distributed under the Boost Software License, Version 1.0. (See accompanying
|
|
|
|
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
|
|
|
|
|
|
#ifndef UUID_CE6983AC753411DDA764247956D89593
|
|
|
|
#define UUID_CE6983AC753411DDA764247956D89593
|
2014-06-03 02:15:11 +03:00
|
|
|
#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
2009-12-01 02:16:50 +00:00
|
|
|
#pragma GCC system_header
|
|
|
|
#endif
|
2009-12-04 06:33:47 +00:00
|
|
|
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
|
|
|
#pragma warning(push,1)
|
|
|
|
#endif
|
2009-12-01 02:16:50 +00:00
|
|
|
|
2015-03-24 15:44:28 -07:00
|
|
|
#include <boost/config.hpp>
|
|
|
|
#include <utility>
|
2008-08-28 23:49:55 +00:00
|
|
|
#include <string>
|
|
|
|
|
|
|
|
namespace
|
|
|
|
boost
|
|
|
|
{
|
|
|
|
namespace
|
|
|
|
exception_detail
|
|
|
|
{
|
|
|
|
class
|
|
|
|
error_info_base
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2012-12-23 03:31:48 +00:00
|
|
|
virtual std::string name_value_string() const = 0;
|
2008-08-28 23:49:55 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
2012-04-28 06:05:06 +00:00
|
|
|
virtual
|
2008-09-01 21:06:09 +00:00
|
|
|
~error_info_base() throw()
|
2008-08-28 23:49:55 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
2008-09-02 23:13:06 +00:00
|
|
|
|
|
|
|
template <class Tag,class T>
|
|
|
|
class
|
|
|
|
error_info:
|
|
|
|
public exception_detail::error_info_base
|
|
|
|
{
|
2016-10-26 11:51:40 -07:00
|
|
|
public:
|
2008-09-02 23:13:06 +00:00
|
|
|
|
|
|
|
typedef T value_type;
|
|
|
|
|
2017-01-03 12:17:27 -08:00
|
|
|
error_info( value_type const & v );
|
2015-03-24 15:44:28 -07:00
|
|
|
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
|
|
|
error_info( error_info const & );
|
2017-01-03 12:17:27 -08:00
|
|
|
error_info( value_type && v ) BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR(value_type(std::move(v))));
|
|
|
|
error_info( error_info && x ) BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR(value_type(std::move(x.v_))));
|
2015-03-24 15:44:28 -07:00
|
|
|
#endif
|
2008-09-02 23:13:06 +00:00
|
|
|
~error_info() throw();
|
|
|
|
|
|
|
|
value_type const &
|
|
|
|
value() const
|
|
|
|
{
|
2017-01-03 12:17:27 -08:00
|
|
|
return v_;
|
2008-09-02 23:13:06 +00:00
|
|
|
}
|
|
|
|
|
2009-08-21 22:28:44 +00:00
|
|
|
value_type &
|
|
|
|
value()
|
|
|
|
{
|
2017-01-03 12:17:27 -08:00
|
|
|
return v_;
|
2009-08-21 22:28:44 +00:00
|
|
|
}
|
|
|
|
|
2016-10-26 11:51:40 -07:00
|
|
|
private:
|
2015-03-24 15:44:28 -07:00
|
|
|
error_info & operator=( error_info const & );
|
|
|
|
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
|
|
|
error_info & operator=( error_info && x );
|
|
|
|
#endif
|
2008-09-02 23:13:06 +00:00
|
|
|
|
2012-12-23 03:31:48 +00:00
|
|
|
std::string name_value_string() const;
|
2008-09-02 23:13:06 +00:00
|
|
|
|
2017-01-03 12:17:27 -08:00
|
|
|
value_type v_;
|
2008-09-02 23:13:06 +00:00
|
|
|
};
|
2008-08-28 23:49:55 +00:00
|
|
|
}
|
|
|
|
|
2009-12-04 06:33:47 +00:00
|
|
|
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
|
|
|
#pragma warning(pop)
|
|
|
|
#endif
|
2008-08-28 23:49:55 +00:00
|
|
|
#endif
|