708
708 copied to clipboard
Parameter passing and initialization
I was playing around with the prototype compiler on godbolt and ran into a frustrating problem. When I'm programming (particularly when experimenting admittedly) if I type ```in``` there is an...
I couldn't find anywhere in the paper (apologies if it's because I didn't look hard enough rather than because it's not there) that talks about the type of a function...
I would like to see a destructive move with the new semantics. We are not allowed to use this project after passing into the move function without using replacement new...
If I understand Appendix 1 correctly, a function of the form: ``` // Where B is a large type. void f(in B b) { use(b); } ``` generates the following...
The last line prints `1`, but it should print `2` because `f(param)` is the definite last use of the `param`... Godbolt repro: https://cppx.godbolt.org/z/17noYP ``` struct X {}; void f(X const&)...
The basic case is: void move_in(move auto a, in auto b) { copy_from(a, b); } // ... move_in(std::move(s), s); This bug seems fragile... each of the following repros sometimes crashes...
Thanks for this great proposal! I was trying this at https://cppx.godbolt.org. I faced this issue that `forward auto` does not compile: https://cppx.godbolt.org/z/ezPz7K ```cpp #include using namespace std; auto myfun(in auto...
When an `in` parameter is copied (type is small and trivially copyable), there's no need to pass an extra bit to remember whether it was a non-const rvalue. Repro 1,...
`forward` parameters are not yet implemented. Repro: https://cppx.godbolt.org/z/WrarG3
Variadic parameters don't yet work. Example: `void f(in int ...ts)`. Repro: https://cppx.godbolt.org/z/3bGrxM