lilypond-devel
[Top][All Lists]
Advanced

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

Re: Create a module variable access system for C++ (issue 249920043 by a


From: dak
Subject: Re: Create a module variable access system for C++ (issue 249920043 by address@hidden)
Date: Tue, 30 Jun 2015 01:02:31 +0000

On 2015/06/30 00:49:33, Dan Eble wrote:
On 2015/06/30 00:30:15, dak wrote:
> I don't understand what you are trying to say here.  Apparently you
are
arguing
> for the "explicit" keyword.  We don't use any C++11 feature
elsewhere in
> LilyPond.

Explicit constructors were a feature before C++11.  It's explicit
conversion
methods that are new.

> At any rate, C++ conversion rules do not permit using two implicit
conversions
> in a row.  You need a cast or an intermediate assignment to get
both.

Yes, I think you're right.  If I can remember the specifics of why the
lack of
explicit worried me, I'll let you know.

I vaguely remember that stuff could become a nuisance in connection with
numeric promotion rules because promotion might get combined with
implicit conversion (at least it could in ARM times: I'd have to
reexamine the current standard to see if that is still the case).

But there are no numeric types involved here.

I'll check whether SCM("name") works.  It's actually unlikely because
even if C++ was able to use two implicit conversions in a row, it would
still have the ambiguity of deciding between Scm_module ("name") and any
Scm_variable<...> ("name") for doing the conversion.

https://codereview.appspot.com/249920043/



reply via email to

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