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
considered
initializers rather than temporaries). But it would seem weird to
have a
constructor/convertor that silently takes a non-Transform SCM value to
an
identity transform.
What would your favorite be here? It's not like this pattern occurs
often
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? https://codereview.appspot.com/344970043/ _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel