-
Notifications
You must be signed in to change notification settings - Fork 15
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
shape allows construction from incompatible shapes (std::is_constructible and std::is_assignable are broken for std::tuple on various STLs) #20
Comments
|
I think this is not actually technically broken on the various STLs I've tried, it just fails in a way that doesn't produce the right SFINAE behavior. It produces large ugly stacks of compiler errors from inside std::is_constructible, instead of producing a false value. |
This issue is kinda important. Is it still a problem with STLs in use in 2023? To retain backwards compatibility, do we want to consider:
|
I tried re-enabling the usage of this here: https://github.com/dsharlet/array/tree/is_constructible. It seems to work fine, but actually relying on it to catch failures produces garbagy results for me still. You can try uncommenting this test and seeing what happens: https://github.com/dsharlet/array/blob/master/test/errors.cpp#L57-L61 I've found another problem here: the errors.cpp test is currently not passing on gcc, but it "passes" because |
Some compilers have a broken implementation of
std::is_constructible<std::tuple<...>, std::tuple<...>>
, which makes it hard to prevent shapes from being constructed/assigned from incompatible shapes.The text was updated successfully, but these errors were encountered: