Fixed bug which made clang not compile due to friendship not inherited