Closed jamadagni closed 2 months ago
Also
lamba → lambda
Should there be a global search replace for this? :thinking:
Ohkay the only one other place I found this is:
[ :slightly_smiling_face: lamba in Hindi means tall, and I have had that word used to refer to my 6′3″ height :wink: ]
You can/should open a PR if you have the time, first time contributors will need to sign a CLA, but if you plan on contributing more in the future its probably a good idea to do it early 🙂
@DyXel yes I can do that and have already forked the repo prior to this evening's post. [Not to mention would be a point of pride to have my teensy contribution included.]
End of long sentence: construction in the callee or caller?
But how about things like the above where I'm not sure?
But how about things like the above where I'm not sure?
Asking is the right thing to do.
construction in the callee or caller?
In the callee, so this is correct. Essentially, any out
argument in a function needs to be assigned to first, which would need to do the necessary operations to construct and/or set a meaningful value to the object, but this happens within the function, not outside of it. The next section explains it more clearly: https://hsutter.github.io/cppfront/cpp2/functions/.
Thanks! I'll take a look at the PR, just sent you a CLA.
- that definite first use must be of the form
obj = value;which is a constructor call, or else pass
objas an
outargument to an
outparameter (which is also effectively a constructor call, and performs the construction in the callee).
End of long sentence: construction in the callee or caller?
In the callee. The callee ensures that the constructor is called for its out
parameter if the argument isn't constructed yet (and performs the call), and that's what makes any function with an out
parameter effectively a delegating constructor for that parameter.
https://github.com/hsutter/cppfront/blob/61e68bb3fe49d2755c8190b865d66331488a2b51/docs/cpp2/declarations.md?plain=1#L51
lamba → lambda
https://github.com/hsutter/cppfront/blob/61e68bb3fe49d2755c8190b865d66331488a2b51/docs/cpp2/objects.md?plain=1#L82
insert
<<
https://github.com/hsutter/cppfront/blob/61e68bb3fe49d2755c8190b865d66331488a2b51/docs/cpp2/objects.md?plain=1#L71
End of long sentence: construction in the callee or caller?