Compiler bug?

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


Hi,

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 {
public:
  template <void (A::*mf)()>
  void zip () { }
  void fun () { }
};

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


void x ()
{
  bex.zip <&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,
    Mojca


More information about the macports-dev mailing list