Thread View: comp.std.c++
1 messages
1 total messages
Started by Hugo van der Sanden
Mon, 29 Jan 1996 15:53
Sep '95 draft standard: meaning of 14.5
Author: Hugo van der Sanden
Date: Mon, 29 Jan 1996 15:53
Date: Mon, 29 Jan 1996 15:53
24 lines
1412 bytes
1412 bytes
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. ]
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads