https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68313

Johannes Schaub <schaub.johannes at googlemail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schaub.johannes@googlemail.
                   |                            |com

--- Comment #1 from Johannes Schaub <schaub.johannes at googlemail dot com> ---
If instead of namespaces you would have used a class, and class N1 would be a
baseclass of N2, your code would be ill-formed to the letter of the Standard:

"A non-template member function ([dcl.fct]) with a given name and type and a
member function template of the same name, which could be used to generate a
specialization of the same type, can both be declared in a class. When both
exist, a use of that name and type refers to the non-template member unless an
explicit template argument list is supplied."

What happens if you use unqualified names, i.e. if you declare the explicit
instantiation directly in namespace N2. And what happens if you use a "<>" to
try and explicitly refer to the template? Just as a question of interest.

Reply via email to