-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use List<const Whatever> for encodable lists. (#11006)
We should not be requiring creation of non-const data to encode a list if it can be backed by const data instead. Another option would be to make List<T> inherit from Span<const T>, but that makes some assumptions about whether people will want to write to a buffer via its List representation. The change to the List::operator= is because importing _all_ operator= from the super-class, including the implicitly-defined ones, causes assignments from List<T> to List<const T> to be ambiguous. Forwarding just the one operator= we want to forward fixes that.
- Loading branch information
1 parent
d9857ce
commit 1669826
Showing
3 changed files
with
106 additions
and
92 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.