-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose error_category's internal unique id #80
Comments
We ran into a bug in the work codebase related to this today. Code was using a default constructed Unfortunately, status_code's wrapper of boost error code was written before you added a set of flags to denote if the boost error code is wrapping a std error code. The added payload is a big problem for status code, because we'd really like to be able to squirrel a boost error code into an It seems to me that the added state in boost error code is only used for wrapping std error codes, so if I could peek into boost error code sufficiently that I can see if boost is wrapping std, then status code can wrap the std error code directly, and then status code's wrap of boost error code can safely drop the added state and remain layout erase compatible with Any chance of addressing this soon? |
You can detect (at present) whether
This used to be true, but it now stores a pointer to a source location associated with the error. |
Since which version of Boost?
Surely safe to drop for status code's purposes? |
I think that the macro |
Thanks for the info. I think I have a solution for the immediate issue based on your help. I'd still like access to those internal unique id's and the ability to look up singleton error categories. |
I don't think that the ability to get a singleton by ID will ever be implemented. There's no central registry for these, and no way to e.g. link them up at construction time because the categories are For your first request, I remember that when I actually looked at what you want it for, I concluded that it won't solve your problem, but the link is dead now, so I can't check. |
For https://github.com/ned14/status-code/blob/master/include/boost_error_code.hpp#L109 I'd like to be able to access
error_category
's internal unique id.For https://github.com/ned14/status-code/blob/master/include/boost_error_code.hpp#L101 I'd like the ability to get some singleton
error_category&
for a specificerror_category
unique id. Then unique category id's can always be turned into an error category singleton, which makes exposing the unique id more widely useful.The text was updated successfully, but these errors were encountered: