"Access to a private member" build failure(s) — clang 3.4.2

This code is accepted by g++ but refused by clang.
gcc bug #52373 has been reported, which is a duplicate of the bug #41437.
class A
{
    struct st
    {
        static void f();
    };
};

template <typename t> void foo()
{
    A::st::f();
}
PackageVersionSupposed error messageFull log Bug report
bobcat 3.23.00-2tmp/bobcat/fswap:90:12: error: 'Xch' is a private member of 'FBB::FSwap' Log
crystalspace 2.0+dfsg-1./include/csutil/hash.h:318:50: error: 'key' is a private member of 'CS::Container::HashElement' Log
libecap 0.2.0-1../../../src/libecap/common/area.h:60:77: error: 'does_not_support_comparisons' is a private member of 'libecap::Area' Log

3 errors