You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the documentation of static_vector, its member function reserve should be noexcept. But in fact it is not. The documentation is probably generated from the function declaration at line 540. But this code is only defined when the macro BOOST_CONTAINER_DOXYGEN_INVOKED is defined. When actually calling the function, the overload from the base class (boost::container::vector<...>) gets called, which is defined in vector.hpp, line 1567.
I would be willing to provide a pull request with a fix, but I am not sure what needs to be fixed.
The first option would be to not mention noexcept in the documentation, i.e. remove the BOOST_NOEXCEPT_OR_NOTHROW from line 540. The second option would be to move the reserve-function at line 540 out of the BOOST_CONTAINER_DOXYGEN_INVOKED-block and to always provide an actual definition of it.
The text was updated successfully, but these errors were encountered:
Thanks for the report. Throwing on capacity exhaustion depends on the options used by the container (by default it throws when static capacity is exceeded) so the documentation should reflect this.
According to the documentation of static_vector, its member function
reserve
should benoexcept
. But in fact it is not. The documentation is probably generated from the function declaration at line 540. But this code is only defined when the macroBOOST_CONTAINER_DOXYGEN_INVOKED
is defined. When actually calling the function, the overload from the base class (boost::container::vector<...>
) gets called, which is defined in vector.hpp, line 1567.I would be willing to provide a pull request with a fix, but I am not sure what needs to be fixed.
The first option would be to not mention
noexcept
in the documentation, i.e. remove theBOOST_NOEXCEPT_OR_NOTHROW
from line 540. The second option would be to move thereserve
-function at line 540 out of theBOOST_CONTAINER_DOXYGEN_INVOKED
-block and to always provide an actual definition of it.The text was updated successfully, but these errors were encountered: