-
Notifications
You must be signed in to change notification settings - Fork 39
Move enum to private data #17
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
base: develop
Are you sure you want to change the base?
Move enum to private data #17
Conversation
|
Could someone enlighten me on the failing test? In the output I can only see "failed-as-expected" or "passed" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This library has been in use since Boost 1.32.0. This is a breaking change made to cope with a sub-standard auto-complete in an editor. I don't see the benefit to breaking everyone's usage out there.
You could, possibly:
- Introduce the new method(s) and deprecate the direct use of the enum.
- Wait at least one release.
- Move the enum.
However I'm still not convinced the change is worth the aggravation it will cause.
I admit I still do not understand the failing test (I can see only "failed-as-expected" and "passed"), but is it really a breaking change? It is not necessarily an editor issue. And does Of course for someone that knows the library, and knows how all the implicit conversions will spot the error or even understand it, but for those using it occasionally or the first time it is not necessarily that easy.
Which new methods? Deprecating is a good idea, I assume you are suggesting something like
I have no problem with that.
Could you enlighten me what the aggravation would be? Other approaches could be
|
|
As the enumeration is currently public, folks may be using it. Whether they should be using it or not is a different question. I see your points, and I see no other references to indeterminate_value in boost other than the implementation and that the implementation detail is not documented. A change like this should probably wait until after the 1.71.0 release cycle which has already started. The codecov build failure is likely a function of not having updated to the latest boost-ci, which I will do now in a separate PR. |
|
If you rebase on develop it will solve that one failing build. |
As it is an implementation detail, and following code compiles, but does not behave as expected: ---- boost::tribool v1 = boost::tribool::false_value; boost::tribool v2 = boost::tribool::true_value; boost::tribool v3 = boost::tribool::indeterminate_value _value; v1 == boost::tribool::false_value; v2 == boost::tribool::true_value; v3 == boost::tribool::indeterminate_value _value; ----
7ffda5e to
fd4885d
Compare
|
Thank you. |
|
No, I'll just add a 2nd reviewer to verify things are sane. |
|
This looks like something that needs to be fixed, although all direct uses of |
|
Thanks for the review. I guess we can document it as a breaking change for v1.72.0 and the resolution is to have consumers use the provided methods instead of accessing it directly. This would be backwards compatible so they would be able to make this change and then if they had to be compatible with older boost releases, they still would be. |
|
Hello @jeking3 , boost 1.72.0 has been released (https://www.boost.org/users/history/version_1_72_0.html), but this change has not been merged. |
Actually, it is described. https://www.boost.org/doc/libs/1_72_0/doc/html/boost/logic/tribool.html has and https://www.boost.org/doc/libs/1_72_0/doc/html/boost/logic/tribool/value_t.html has So this is not an implementation detail. |
|
@pdimov : you are right. I believe I meant that the documentation does not show anyhow how it interacts with the As far as I've understood @jeking3, the plan was to change the visibility for 1.72 to avoid the issues I've reported (I found this error at least in two projects). Since the change did not get merged, and I could also find no mention in the release notes, I wanted to know how we want to proceed. Alternative solutions (which IMHO are not as good as making the Edit: Some other data about the usage of the enum: I could not find any usage of I still believe (but I acknowledge that this is only my view), that the probability of any valid code to be broken is near zero. |
|
I think that a better way to fix that is to add a private converting constructor from value_t (and leave it undefined). (Or perhaps to add a converting constructor that does the right thing.) |
|
Yes, this would be a possible approach (was thinking I guess I'm still questioning what are valid use-cases for the Edit: making the constructor private or |
|
Up |
As proposed in #16.
It is an implementation detail, as following code compiles, but does not behave as expected: