-
Notifications
You must be signed in to change notification settings - Fork 37
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
chore: add has_trivial_array_constructor
#443
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #443 +/- ##
==========================================
- Coverage 71.22% 70.17% -1.05%
==========================================
Files 9 10 +1
Lines 549 560 +11
==========================================
+ Hits 391 393 +2
- Misses 158 167 +9 ☔ View full report in Codecov by Sentry. |
I like the direction this is going but I'm not sure how widely applicable this will be given how the appropriate constructor method for may not always be the type itself. For example, if you have a reshaped array you generally use As far as tests, we just need to demonstrate that it works consistently for appropriate method definitions. In this case I think you'd just want to try the reconstruction in tests. Should also have docs to make sure we can appropriately maintain and explain what's going on here. |
Agreed, its related to how we want to use this trait within SciMLStructures as well. Maybe a slightly more generalized version of this question could be "can we convert to given type given certain arguments". In which case we can check for applicable(convert, T, args...) which is more idiomatic overall as well. |
Doc build failing from this. |
We need to know if we can construct the parent type given some arguments. This adds a check for whether an
applicable
method exists. It currently doesn't check for unionalls, and I am not sure of how to check for them. In some cases we want to keep the concrete type:I also need to understand what the appropriate tests here would be.