Topic: partial specialization and template argument type


Author: Keyang Wang <keyang@cs.utexas.edu>
Date: 1997/07/15
Raw View
Hi, everyone,

I've got two questions I can't find the answers for.

First, someone asked me the term "partial specialization" that I've
never heard of. I only know the programmer can specialize a function
template by adding a  function with the same name as the template and
with specific argument types and no tmeplate arguments.

Second, does the C++ template understands the type system? For example,
for an untemplated function call, the compiler can verify the validity
of the supplied arguments by comparing their types with those of the
formal parameters. Furthermore, the compiler understands the class
hierarchy, and where the instances of the base calss are valid, the
instances of the subclass can be provided. But it seems to me that
that's not the case for the template arguments. Within the <...> after
the "template", you can only say "class", "typename", or "int", and no
further differentiation among the c++ type system.

Your attention and help are highly appreciated,

Peter
keyang@cs.utexas.edu
---
[ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]