aboutsummaryrefslogtreecommitdiff
path: root/lib/std/bounded_array.zig
AgeCommit message (Collapse)Author
2022-08-16AstGen: detect declarations shadowing localsVeikka Tuominen
Closes #9355
2022-08-08std: fix BoundedArray test checking wrong condition (#12372)Ryotaro "Justin" Kimura
2022-04-14std/bounded_array.zig: Add Writer interfaceAndrew Lee
2022-03-03std.BoundedArray: return explicit errors (#11044)Motiejus Jakštys
* std.BoundedArray: return explicit errors Makes it easier to mark explicit errors when using BoundedArray downstream. * std.BoundedArray.insert() returns Overflow only
2022-01-16Slice function of BoundedArray now returns slice based on self pointerJimmi Holst Christensen
If self pointer is const, the slice is const. Otherwise the slice is mutable.
2022-01-12Allow BoundArray to be default initializedJimmi Holst Christensen
2021-12-15std.bounded_array: support inserting a new value at the end (#10340)Arnav Singh
Since `BoundedArray.insert` internally reserves space for the element to be inserted, it can support inserting at the position that is the current length of the array. Change the check for the insertion position to allow this.
2021-11-20std.bounded_array: fix `self` parameter type in `constSlice`Rohlem
Because `.buffer` is an inline array field, we actually require `self` to be passed as a pointer. If the compiler decided to pass the object by copying, we would return a pointer to to-be-destroyed stack memory.
2021-11-14BoundedArray: add appendAssumeCapacityGregory Anders
2021-08-24remove redundant license headers from zig standard libraryAndrew Kelley
We already have a LICENSE file that covers the Zig Standard Library. We no longer need to remind everyone that the license is MIT in every single file. Previously this was introduced to clarify the situation for a fork of Zig that made Zig's LICENSE file harder to find, and replaced it with their own license that required annual payments to their company. However that fork now appears to be dead. So there is no need to reinforce the copyright notice in every single file.
2021-08-24BoundedArray: a simple way to represent small data whose max size is known ↵Frank Denis
(#9134) This is a simple structure containing an array and a length, that can be viewed as a slice. It is useful to pass-by-copy small data whose exact size is known at runtime, but whose maximum size is known at comptime. This greatly simplifies code that otherwise would require an allocator, or reimplementing what this type does.