Skip to content

Commit

Permalink
[temp.arg.explicit] Remove note obsoleted by P0846R0
Browse files Browse the repository at this point in the history
  • Loading branch information
jensmaurer authored and zygoloid committed Nov 27, 2017
1 parent 0e003d8 commit fc16d31
Showing 1 changed file with 0 additions and 39 deletions.
39 changes: 0 additions & 39 deletions source/templates.tex
Expand Up @@ -6905,45 +6905,6 @@
function name, there is no way to provide an explicit template
argument list for these function templates.
\end{note}
% L7048 USA Core3 1.18 / 14.8.1 [temp.arg.explicit]
% WG21 decided not to address this issue except to document that
% argument-dependent lookup does not apply in this context.

\pnum
\begin{note}
For simple function names, argument dependent lookup\iref{basic.lookup.argdep}
applies even when the function name is not visible within the scope of the call.
This is because the call still has the syntactic form of a function call\iref{basic.lookup.unqual}.
But when a function template with explicit template arguments is used,
the call does not have the correct syntactic form unless there is a function
template with that name visible at the point of the call.
If no such name is visible,
the call is not syntactically well-formed and argument-dependent lookup
does not apply.
If some such name is visible,
argument dependent lookup applies and additional function templates
may be found in other namespaces.
\begin{example}

% Argument added to f per Usenet posting from martin von Loewis, 6 Sep 1998
\begin{codeblock}
namespace A {
struct B { };
template<int X> void f(B);
}
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 applies only to unqualified names
using C::f;
f<3>(b); // well-formed because \tcode{C::f} is visible; then \tcode{A::f} is found by argument dependent lookup
}
\end{codeblock}
\end{example}
\end{note}

\pnum
Template argument deduction can extend the sequence of template
Expand Down

0 comments on commit fc16d31

Please sign in to comment.