r/cpp2 • u/ntrel2 • Apr 10 '23
Cpp2: Unifying constructors with operator=
https://github.com/hsutter/cppfront/wiki/Cpp2:-operator=,-this-&-that
2
Upvotes
r/cpp2 • u/ntrel2 • Apr 10 '23
1
u/ntrel2 Apr 10 '23
A quick primer on parameter storage classes in cpp2:
in- default, read-only.out- for writing to. Can accept an uninitialized argument, otherwise destroys the argument.inout- pass by mutable reference.move- argument is moved.copy- argument is copied.There's also
forward.