Topic: Sep '95 draft standard: meaning of 14.5


Author: hv@compulink.co.uk (Hugo van der Sanden)
Date: 1996/01/29
Raw View
In section 5 of chapter 14 of the September '95 draft standard, it
says this:
  The prefix template <class T> specifies that a template is being
  declared and that a type-name T will be used in the  declaration.

I'm unsure of the implications of the phrase 'will be used' in the
above - does it imply 'will be used 1 or more times' or 'will be used
0 or more times'? In other words, is it an error to declare a template
as:
  template<class T> class useless {
    int i;
  public:
    int get() { return i; }
    void set(int j) { i=j; }
  };
such that 'T' is not used within the definition?

Any clarification would be appreciated,

Hugo van der Sanden
---
[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]