Topic: Template Oddity
Author: mckelvey@fafnir.com (James W. McKelvey)
Date: 1997/06/05 Raw View
I tried a template like this:
template<class T, T min, T max>
and it freaked out the Sun's compiler. But GNU C++ had no problem with it.
So my question is: is such a template legal according to the standard?
--
Where diesel guitars from faraway bars, blast out the
best songs from our holy wars. Coyote carnival catches
on fire, all the cops in the world pick us up on radar.
Jim McKelvey mckelvey@fafnir.com
---
[ comp.std.c++ is moderated. To submit articles: Try just posting with your
newsreader. If that fails, use mailto:std-c++@ncar.ucar.edu
comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
Comments? mailto:std-c++-request@ncar.ucar.edu
]
Author: fjh@mundook.cs.mu.OZ.AU (Fergus Henderson)
Date: 1997/06/07 Raw View
mckelvey@fafnir.com (James W. McKelvey) writes:
>I tried a template like this:
>
>template<class T, T min, T max>
>
>and it freaked out the Sun's compiler. But GNU C++ had no problem with it.
>
>So my question is: is such a template legal according to the standard?
Yes.
--
Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh@128.250.37.3 | -- the last words of T. S. Garp.
---
[ 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 ]