Repository navigation
Conversation
teor2345
left a comment
There was a problem hiding this comment.
It looks like you're missing some overload sets (we want 3-5 different function names), and some overloads within those sets (we want all of the possible overloads).
Please focus on completing this PR so you make it through all 3 steps before the application period ends.
Added both |
There was a problem hiding this comment.
I'm not sure this was intended, but I think we probably don't want the edits made to this file
There was a problem hiding this comment.
We're not ready for edits yet, but we can just ignore them for now 🙂
Editing this file is step 3, we are currently at the end of step 1, at the "wait for review" stage.
There was a problem hiding this comment.
Understood, I moved ahead of the review stages. I’ll wait for step 1 to be reviewed before proceeding with steps 2 and 3.
| overload! { | ||
| impl StdVectorT { | ||
| fn new(_count: c_size_t) -> StdVectorT { | ||
| todo!() |
There was a problem hiding this comment.
It looks like there might have been a version control snafu? Is it expected that these are todo!()?
There was a problem hiding this comment.
The examples are test files that show that overloads conflict in Rust (or can't be implemented in C++). So todo!() is ok here, there's not much point filling in the C++ code when the Rust code will never work.
See the example code here where the overloads conflict when T is size_t:
overloading-macros/cpp-overload-test/examples/stdcpp-forward-list.rs
Lines 34 to 40 in 2389011
Think of them like a cheap version of Rust compiler UI tests, they also come with a stderr output file.
Also, this is step 2 of the PR, this is @thunderseethe's decision. If he thinks that the step 1 work is complete, he can move on to reviewing step 2.
There was a problem hiding this comment.
Yes, these were intentional placeholders in the compile-fail example, not a version-control mistake. The test checks conflicting signatures, so the bodies never run.
|
Just a reminder to move on to steps 2 & 3 in the PR description, and make sure they are up to date with your latest code changes. Applications must be submitted to Outreachy by Monday 9 November, please include this PR and any other Rust PRs you've done in that time. |
Explore C++ std::vector overloads in Rust for constructors, resize, and erase. Document the bridge limitations, demonstrate constructor and receiver conflicts in compile-fail examples, and record the results in the compatibility table.
Limitationsdoc sectionErgonomicsdoc sectionIncompatibilitiesdoc sectionWorkaroundsdoc sectionInexpressible Overloadsdoc sectionAI disclosure: Codex helped to explain and understand the problem, then gave conceptual solution.