diff --git a/include/boost/exception/exception.hpp b/include/boost/exception/exception.hpp index d762cf8..b2e1bca 100644 --- a/include/boost/exception/exception.hpp +++ b/include/boost/exception/exception.hpp @@ -12,6 +12,8 @@ #pragma warning(push,1) #endif +#include + namespace boost { @@ -197,8 +199,23 @@ boost template E const & set_info( E const &, throw_line const & ); + +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + template + E const & set_info( E const &, error_info && ); + + template + E const & set_info( E const &, throw_function && ); + + template + E const & set_info( E const &, throw_file && ); + + template + E const & set_info( E const &, throw_line && ); +#endif } + #if defined(__GNUC__) # if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) # pragma GCC visibility push (default) @@ -257,6 +274,20 @@ boost template friend E const & exception_detail::set_info( E const &, error_info const & ); +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + template + friend E const & exception_detail::set_info( E const &, throw_function && ); + + template + friend E const & exception_detail::set_info( E const &, throw_file && ); + + template + friend E const & exception_detail::set_info( E const &, throw_line && ); + + template + friend E const & exception_detail::set_info( E const &, error_info && ); +#endif + friend char const * exception_detail::get_diagnostic_information( exception const &, char const * ); template @@ -309,6 +340,31 @@ boost x.throw_line_=y.v_; return x; } +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + template + E const & + set_info( E const & x, throw_function && y ) + { + x.throw_function_=y.v_; + return x; + } + + template + E const & + set_info( E const & x, throw_file && y ) + { + x.throw_file_=y.v_; + return x; + } + + template + E const & + set_info( E const & x, throw_line && y ) + { + x.throw_line_=y.v_; + return x; + } +#endif } ////////////////////////////////////////////////////////////////////////