Topic: nested class member templates
Author: Tony Cook <tony@online.tmx.com.au>
Date: 1995/08/25 Raw View
Is there a specific reason that a nested class cannot have a member
template?
My main query is why the specific restriction exists.
--
Tony Cook - tony@online.tmx.com.au
100237.3425@compuserve.com
---
[ 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. ]
Author: clamage@Eng.Sun.COM (Steve Clamage)
Date: 1995/08/28 Raw View
Distribution:
In article 95Aug24221434@Austern, Tony Cook <tony@online.tmx.com.au> writes:
>
>Is there a specific reason that a nested class cannot have a member
>template?
>
>My main query is why the specific restriction exists.
I didn't find that restriction in the draft, but I may have missed it.
There is a restriction that a *local* class cannot have a member template.
(A local class is one defined inside a function.) You cannot declare a
template inside a function, so it seems reasonable to disallow template
members of local classes for the same reason.
---
Steve Clamage, stephen.clamage@eng.sun.com
---
[ 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. ]
Author: tony@online.tmx.com.au (Tony Cook)
Date: 1995/08/30 Raw View
Steve Clamage (clamage@Eng.Sun.COM) wrote:
: In article 95Aug24221434@Austern, Tony Cook <tony@online.tmx.com.au> writes:
: >Is there a specific reason that a nested class cannot have a member
: >template?
: I didn't find that restriction in the draft, but I may have missed it.
Sorry, I misread it.
--
Tony Cook - tony@online.tmx.com.au
100237.3425@compuserve.com
---
[ 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. ]