Closed DymOK93 closed 2 years ago
Done in #64
Oh, I see you have completely reworked the BitException
in the develop
branch, so take into account my remark about the noexcept
specifier, please. You need to use a macro BOOST_NOEXCEPT
from the Boost library or implement it yourself.
Hi! First of all, thanks for the issue and the pull request!
BitException::getErrorCode() doesn't change the internal state of the exception object and therefore should be const. This will allow accepting an exception by a constant reference in the catch block:
Yeah, this was an oversight by me. It should have been const
from the beginning!
Done in #64
I actually already fixed this in https://github.com/rikyoz/bit7z/commit/c9c5204222b67bcc0163a725c7765f5585349f0f, but then forgot to backport the change to the master
branch. I will merge your pull request so that bit7z v3 gets the fix as well. And I will probably have to release a new patched version, 3.1.5.
Oh, I see you have completely reworked the BitException in the develop branch
Yes, mainly to support a cross-platform use of the library. Now BitException
extends std::system_error
, instead of std::runtime_error
.
so take into account my remark about the noexcept specifier, please. You need to use a macro BOOST_NOEXCEPT from the Boost library or implement it yourself.
Thanks for pointing that out! Yeah, the next version of bit7z (4.0) will actually drop the support for MSVC2012. It will require a compiler supporting at least C++14, so essentially from MSVC2015 or later. So, there will be no problem with noexcept
.
I decided to stick to newer MSVC compilers to clean up the code, and MSVC2012's issues with noexcept
also contributed to this decision.
Thank you again! 🙏
Feature description
Hi!
BitException::getErrorCode()
doesn't change the internal state of the exception object and therefore should beconst
. This will allow accepting an exception by a constant reference in the catch block:Additional context
No response
Code of Conduct