Files
sdk/runtime/platform
Andrei Constantinescu e72adbc6ca [util] Allow USE() template to be used with Dart heap objects
Currently, Dart heap objects are non-copyable. For this reason, code such as

> const Function& f = ...
> USE(f);

would not compile. Doing this can be useful when doing initial testing runs of one's code. Of course, the problem generalises to other kinds of objects.

This CL fixes the issue by changing the template function to use a universal reference.
The other beneficial aspect of this change is that when a copyable class is passed to USE, it will no longer be copied.

Tested: all trybots, see results.

Change-Id: Ic1497067e2228b1b59806ddad8df9e85d87f4c27
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162502
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Andrei Constantinescu <andreicostin@google.com>
2020-09-15 09:50:02 +00:00
..
2020-05-07 19:40:18 +00:00
2020-05-07 19:40:18 +00:00
2020-05-12 20:28:11 +00:00