[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Add and use a Transform data type (issue 344970043 by address@hidden

From: dak
Subject: Re: Add and use a Transform data type (issue 344970043 by address@hidden)
Date: Thu, 21 Jun 2018 03:40:30 -0700

On 2018/06/21 08:48:32, dak wrote:

A constructor/function from Transform * seems like a side track when
the only
use case is conversion from SCM.  A constructor avoids an extra copy
(but I
think C++19(?) or so already states that returned classes are to be
initializers rather than temporaries).  But it would seem weird to
have a
constructor/convertor that silently takes a non-Transform SCM value to
identity transform.

What would your favorite be here?  It's not like this pattern occurs
enough (yet) to really require something here or right now.

Answering myself here, this would seem to be between ly_scm2transform
and robust_scm2transform .  What I don't fancy about the robust variants
is that they require creating a default even when it isn't getting used.
 Maybe if that default generally is a const reference and can be
provided statically?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]