[fpc-devel] Copy/move operator

Ben Grasset operator97 at gmail.com
Thu Jun 20 02:04:23 CEST 2019


On Wed, Jun 19, 2019 at 6:19 PM Ryan Joseph <genericptr at gmail.com> wrote:

> Because a copy isn’t necessarily an assignment. See the dynamic array
> example again. The only way the record knows it was copied into the array
> is via the copy operator.
>

I guess what I'm trying to get at is:

A) Most of the time, the default behaviour of what fpc_copy_proc does seems
like it would be what you wanted anyways

B) The level of indirection between a `Copy` operator you do decide to
implement yourself and how it ends up getting called seems undesirable
(`fpc_copy_proc` actually itself does nothing but call a function called
`fpc_copy`, for example, and obviously is not inlined away despite the fact
that whoever wrote it did actually mark it as `inline.`)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20190619/5c1469e4/attachment-0001.html>


More information about the fpc-devel mailing list