major improvements to std/wrapnils: optimal codegen, case objects, lvalue semantics (#18435)
* wrapnils now generates optimal code; also handles case objects * changelog * unsafeAddr => addr
This commit is contained in:
parent
b72ecaf639
commit
d1447fe25d
3 changed files with 329 additions and 109 deletions
|
|
@ -279,6 +279,10 @@
|
|||
issues like https://github.com/nim-lang/Nim/issues/13063 (which affected error messages)
|
||||
for modules importing `std/wrapnils`.
|
||||
Added `??.` macro which returns an `Option`.
|
||||
`std/wrapnils` can now be used to protect against `FieldDefect` errors in
|
||||
case objects, generates optimal code (no overhead compared to manual
|
||||
if-else branches), and preserves lvalue semantics which allows modifying
|
||||
an expression.
|
||||
|
||||
- Added `math.frexp` overload procs. Deprecated `c_frexp`, use `frexp` instead.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue