You should use an elaborated type specifier:
class test an_instance_of_test;
As the standard says (§3.4.4):
An elaborated-type-specifier (7.1.6.3) may be used to refer to a previously declared class-name or enum-name even though the name has been hidden by a non-type declaration.
The name lookup simply ignores any names of non-types:
the identifier is looked up according to 3.4.1 but ignoring any non-type names that have been declared.