You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.length for vector (also: slength for signed length?)
.ptr for string
for shared_ptr and unique_ptr, .ptr gets repeated a lot, at any point of use. Not sure how alias this can settle that.
ref inout(T) for vector index and slices, currently only mutable supported. Tricky with atomics.
ref inout(T) for string index and slices
Note during yxml development:
unique_ptr!A not naturally covariant with a B class that would descend from A. This is quite complicated, when involving vector!unique_ptr after... ouch
unique_ptr!A a = unique_new!A();
vector!(unique_ptr!A) v;
v ~= a; // fail
v ~= unique_new!A(); // but this works
perhaps an explicit ".appendMove" operation?
vector!(unique_new!Class) owns every element. But vector!(Struct*) and vector!Class also own every element. It just bypass the whole move constraint and is more usable for now than vector!(unique_ptr!Class)
The text was updated successfully, but these errors were encountered:
I tried to modify njson to use more numem:
slength
for signed length?).ptr
for string.ptr
gets repeated a lot, at any point of use. Not sure how alias this can settle that.ref inout(T)
for vector index and slices, currently only mutable supported. Tricky with atomics.ref inout(T)
for string index and slicesNote during yxml development:
unique_ptr!A
not naturally covariant with a B class that would descend from A. This is quite complicated, when involvingvector!unique_ptr
after... ouchnogc_delete
crashes if the class instance access its surrounding frame (not a static class). So this shall be documented, I don't see a way out. (EDIT: this is related to std.conv.emplace segfaults for nested types dlang/phobos#10125)unique_ptr
can't be copied:vector!(unique_new!Class)
owns every element. Butvector!(Struct*)
andvector!Class
also own every element. It just bypass the whole move constraint and is more usable for now thanvector!(unique_ptr!Class)
The text was updated successfully, but these errors were encountered: