[exception] c++11 updates
I've been working with boost exception and looking at the develop branch on github it looks like much of it hasn't been updated for c++11. Is anyone already working on this already? If not, I'd like to make the following changes: - add rvalue-reference overloads to the error_info class ( https://github.com/boostorg/exception/blob/develop/include/boost/exception/d...) and elsewhere so that you can do things like throw my_error() << my_info(std::move(a)) - replace occurrences of "throw()" with a macro (something like BOOST_NO_THROW_SPECIFICATION) that expands to "throw()" if compiling with c++98 and "noexcept" if compiling >= c++11 would these changes be ok? Thanks, Ryan
On Thu, Mar 19, 2015 at 4:36 PM, Ryan Burn
- add rvalue-reference overloads to the error_info class (
https://github.com/boostorg/exception/blob/develop/include/boost/exception/d... ) and elsewhere so that you can do things like
throw my_error() << my_info(std::move(a))
Yes I'd welcome such change.
- replace occurrences of "throw()" with a macro (something like BOOST_NO_THROW_SPECIFICATION) that expands to "throw()" if compiling with c++98 and "noexcept" if compiling >= c++11
This one requires a lot more care. The only reason why the current definition uses throw() is to avoid compile errors from broken compilers. What is the motivation for this change request? I personally don't use throw() or noexcept in my exception types and I've never had any issues with that. -- Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode
On Fri, Mar 20, 2015 at 2:58 PM, Emil Dotchevski
On Thu, Mar 19, 2015 at 4:36 PM, Ryan Burn
wrote: - add rvalue-reference overloads to the error_info class (
https://github.com/boostorg/exception/blob/develop/include/boost/exception/d...
) and elsewhere so that you can do things like
throw my_error() << my_info(std::move(a))
Yes I'd welcome such change.
I put together some pull requests to add the move semantics https://github.com/boostorg/throw_exception/pull/3 https://github.com/boostorg/exception/pull/6 Could you review please? Thanks, Ryan
participants (2)
-
Emil Dotchevski
-
Ryan Burn