Proposed resolution (September, 2010): Change 13.4.3 [temp.arg.nontype] bullet 1.3 as follows:
a constant expression (7.7 [expr.const]) that
designates the address of an object or function with external
linkage, including function templates and function template-ids
but excluding non-static class members, expressed (ignoring
parentheses) as & id-expression, except that the
& may be omitted if the name refers to a function or
array and shall be omitted if the corresponding
template-parameter is a reference; or
The current wording of 13.4.3 [temp.arg.nontype] paragraph 1 does
not prevent the use a reference as a non-type template argument. It
simply requires This would presumably (but unintentionally?) allow an example like
the following: The expression &ref is not a constant expression, but
the current wording of 13.4.3 [temp.arg.nontype] does not require a
constant expression.
the address of an object or function with external linkage... expressed
as & id-expression...
struct S { };
template<S*> struct X { };
S s;
S& ref = s;
X<&ref> xr; // well-formed?