This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 110c. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2023-02-07


241. Error in example in 14.8.1

Section: 13.10.2  [temp.arg.explicit]     Status: TC1     Submitter: Mike Miller     Date: 9 Aug 2000

13.10.2 [temp.arg.explicit] paragraph 6 contains the following example:

    namespace A {
        struct B { };
        template<int X> void f();
    }
    namespace C {
        template<class T> void f(T t);
    }
    void g(A::B b) {
        f<3>(b);    // ill-formed: not a function call
        A::f<3>(b); // well-formed
        C::f<3>(b); // ill-formed; argument dependent lookup
                    // only applies to unqualified names
        using C::f;
        f<3>(b);    // well-formed because C::f is visible; then
                    // A::f is found by argument dependent lookup
    }

A::f() should have a parameter of type A::B.

Proposed resolution (10/00):

In the example in 13.10.2 [temp.arg.explicit] paragraph 6, change the third line from

        template <int X> void f();

to

        template <int X> void f(B);