Prevents the specified template declaration from being instantiated.
You can use this pragma to suppress the implicit instantiation of a template for which a definition is supplied.
If you are handling template instantiations manually (that is, -qnotempinc and -qnotemplateregistry are specified), and the specified template instantiation already exists in another compilation unit, using #pragma do_not_instantiate ensures that you do not get multiple symbol definitions during the link step.
#pragma do_not_instantiate on
a class template specialization is treated as an explicit instantiation
declaration of the template. This pragma provides a subset of the
functionality of the explicit instantiation declarations feature,
which is introduced by the C++0x standard. It is provided for compatibility
purposes only and is not recommended. New applications should use
explicit instantiation declarations instead.
You can also use the -qtmplinst option to suppress implicit instantiation of template declarations for multiple compilation units. See -qtmplinst (C++ only).
#pragma do_not_instantiate Stack < int >