Repository navigation
Conversation
Signed-off-by: Ikeh Chukwuka <mrikehchukwuka@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this commit covers
std::arrayoverloads, starting with the constructors. nextto_arrayandgetwill be my focus for the next commits.std::arrayconstructors are aggregate initialization with 0 toNinitializers, in addition with its copy and move constructors. its overloads doesn't clash like other data structures, like sayforward_listforcount/valuecases.c++ has two zero-argument forms (
a;anda{};), but only one of them can be a rust overload, so i used value-initialization.for the other overloaded methods on
std::arraywhich only differ byconstor&/&&, i’m plan to usegetandto_arrayas the examples for that rule.ai use: i used claude (web) to get explanation across different parts of the codebase, especially the
overload!implementation and understanding of how overloads dispatch.the code implementation are mine, written after studying
forward_list, as i already have understanding ofstd::arrayspecs from c++.after studying
forward_listand the use of&mutfor c++ move, i want to ask if there have been any discussion about offering rust style move (by value)? i understand this would be a mismatch between both languages, but i curious for case when the moved-from c++ object itself needs not to be used after it is moved. because i initially implemented move to take ownership of theotherobject.closes #34
Limitationsdoc sectionErgonomicsdoc sectionIncompatibilitiesdoc sectionWorkaroundsdoc sectionInexpressible Overloadsdoc section