-
Notifications
You must be signed in to change notification settings - Fork 274
add an implementation of std::variant<...> #3962
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
Conversation
I don't usually like introducing dependencies, but this one will disappear by itself with time. |
17a47d6
to
fcf729c
Compare
fcf729c
to
ff29a79
Compare
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.
I'm not particularly convinced we need this, but should there genuinely be a use case we need tests (cf. unit/util/optional.cpp), and possibly documentation, though tests would also serve as such. As is, we have no idea whether this passes CI.
ff29a79
to
5bb5cb0
Compare
5bb5cb0
to
7fdf8bd
Compare
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.
😱 👍 🥕 Let's make it happen!
5d3a2c9
to
83f53a7
Compare
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 PR failed Diffblue compatibility checks (cbmc commit: 83f53a7).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/98995273
Status will be re-evaluated on next push.
Please contact @peterschrammel, @thk123, or @allredj for support.
Common spurious failures:
- the cbmc commit has disappeared in the mean time (e.g. in a force-push)
- the author is not in the list of contributors (e.g. first-time contributors).
The incompatibility may have been introduced by an earlier PR. In that case merging this
PR should be avoided unless it fixes the current incompatibility.
83f53a7
to
b10a24e
Compare
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.
✔️
Passed Diffblue compatibility checks (cbmc commit: b10a24e).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/99566510
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.
Looks really useful. I notice that the upstream repository for this includes tests. Maybe we should copy over the tests as well, so this can be tested on CI.
b10a24e
to
ffca144
Compare
I had a quick look at the upstream tests - they are written in GTest - I think rewriting them in catch would be time consuming and error prone. Instead - I suggest including this as a submodule so we can trust that the tests are run by the upstream CI. Alternatively, we could run the tests on our CI - but would involve adding a dependency on gtest for CI. (closed by mistake!) @tautschnig for motivation - I think if this had existed when |
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.
✔️
Passed Diffblue compatibility checks (cbmc commit: ffca144).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/102486684
|
@kroening in principle yes, I worried in practise that something that central would be a very large undertaking. I proposed it as a "motivating example" to demonstrated there are use cases on the assumption that other uses cases that are less entwined was also crop up. |
Added as a submodule in #4344 if people would like to review that as well. |
This PR appears like it could be useful if rebased, any chance of this being revisited (or should we consider closing as too old and out of date)? |
This allows strengthening type safety in a number of data structures we already have.
ffca144
to
0208d01
Compare
Codecov Report
@@ Coverage Diff @@
## develop #3962 +/- ##
========================================
Coverage 75.90% 75.90%
========================================
Files 1515 1515
Lines 163990 163989 -1
========================================
+ Hits 124473 124474 +1
+ Misses 39517 39515 -2
Continue to review full report at Codecov.
|
@tautschnig This PR now passes all CI and is waiting only on your requested change, can you please have a look? |
Closing due to age (no further comment on PR content), please reopen with rebase on develop if you intent to continue this work. |
This appears to require update 3 of MSVC 2015, which may be an issue.