Mir

Code review comment for lp:~vanvugt/mir/clang

Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

> I don't think:
> Displacement const disp = Displacement();
> is a good alternative. Doesn't that create a non-const temporary anyway?

Depends on the compiler. I expect that the compiler is able to elide the copy and use of a temporary object.

But even if there is a non-const temporary involved, I don't see a problem; we don't (or have any way to) access this temporary object.

« Back to merge proposal