Not really. The standard explicitly disallows such a declaration in [temp]p2;
The declaration in a template-declaration (if any) shall
declare or define a function, a class, or a variable, or
define a member function, a member class, a member enumeration, or a static data member of a class template or of a class nested within a class template, or
define a member template of a class or class template, or
be a deduction-guide, or
be an alias-declaration.
An empty-declaration doesn't match any of those clauses. Now the standard says that an implementation is required to issue a diagnostic message for any violation of its rules, like this one. Note that it says diagnostic, it doesn't specify whether a warning or an error (or even a note) is issued. The compiler can provide extensions that make what you wrote valid, as it wouldn't change the meaning of a well-formed program.
So no, both are right. However, clang's behavior is due to an extension, not something that the standard specifies.
template<typename>
– Mongolia