-
Notifications
You must be signed in to change notification settings - Fork 20
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
Allow for structured bindings from const camp::tuple #140
Allow for structured bindings from const camp::tuple #140
Conversation
…uple...added some unit testing as well
test/tuple.cpp
Outdated
// a = 4; | ||
// b = 10.1; |
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.
@trws Do you have a preferred method for testing that compilations fail, or are you ok not testing? I don't think you can protect yourself fully given the tuple
of references
behavior?
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 have some infrastructure for compilation death tests, but pulled it out of mainline camp because checking the error messages proved rather brittle. If possible I'd say factor the test to use decltype on the binding to verify it's const-qualified as it should be, then we can keep the tests positive. If not I can dredge that stuff back up. It amounts to generating a non-auto cmake target that builds the test then registering cmake --build --target tgt as the test for ctest to run. Surprisingly robust, but also frustrating to make sure you're testing only what you want to test.
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.
Well...maybe the static_assert( is_same<>)
checks are sufficient. It is up to you.
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 think the static_asserts are sufficient.
@trws I assume you squash merge, so this history doesn't need to be clean? |
Yeah that’s no problem.
|
@trws Is there something I need to do to pass the checks that are failing? |
Nope, not this time. The sycl container broke a couple of days ago and I haven't had time to fix it yet. Thanks @rrsettgast! |
closes #139