Compiler bug?

Mojca Miklavec mojca at
Sun Jul 17 05:18:33 PDT 2016


I am unable to compile lilypond 2.19.45 (the problem must have started
at around 2.19.42 or 43).

One of the developers came up with the following minimal example (from
the source code that Lilypond is using) that works with g++, but fails
with clang++:

class A {
  template <void (A::*mf)()>
  void zip () { }
  void fun () { }

class B : public A
  using A::zip; // Fails to involve A::zip in overloading resolution
  template <void (B::*mf)()>
  void zip () { }
} bex;

void x ()
{ <&B::fun> ();

Can someone with a deeper insight into C++ please clarify if this is a
compiler bug or just something that gcc is happy with even if it's not
according to the standard?

He suggested to compile lilypond with GCC, but lilypond has lots of
dependencies and I'm not sure if stdlib (non-)compatibility would play
a role or not.

Thank you,

More information about the macports-dev mailing list