Overloading type from parent namespace

Viewed 92

This seems to compile correctly:

namespace A {
    template<typename T>
    struct S {};

    namespace B {
        using S = S<int>;
    }
}

int main() {
    using namespace A::B;
    S s;
}

Even though at the line using S = S<int>, the first S refers to A::B::S, whereas the second S refers to the template A::S.

Is this standard C++?

1 Answers
Related