Topic: Default values for template arguments
Author: maxtal@physics.su.OZ.AU (John Max Skaller)
Date: Sat, 26 Nov 1994 06:53:24 GMT Raw View
In article <steagall.1.000CCA27@WebSystems.Cleveland.OH.US> steagall@WebSystems.Cleveland.OH.US (Bob Steagall) writes:
>What is the current state of the standard regarding default values for template
>arguments? Specifically, will it be possible to specify a class name as a
>default value for a template argument (along following lines)?
>
>class SimpleType {...};
>
>template<class T, class U = SimpleType> LessSimpleType {...};
Yes. Note your syntax error though:
template<class T, class U = SimpleType> class LessSimpleType {...};
^^^^^
--
JOHN (MAX) SKALLER, INTERNET:maxtal@suphys.physics.su.oz.au
Maxtal Pty Ltd,
81A Glebe Point Rd, GLEBE Mem: SA IT/9/22,SC22/WG21
NSW 2037, AUSTRALIA Phone: 61-2-566-2189
Author: steagall@WebSystems.Cleveland.OH.US (Bob Steagall)
Date: Tue, 15 Nov 1994 12:47:17 Raw View
What is the current state of the standard regarding default values for template
arguments? Specifically, will it be possible to specify a class name as a
default value for a template argument (along following lines)?
class SimpleType {...};
template<class T, class U = SimpleType> LessSimpleType {...};
Thanks,
Bob
Author: jason@cygnus.com (Jason Merrill)
Date: Tue, 15 Nov 1994 20:52:02 GMT Raw View
>>>>> Bob Steagall <steagall@WebSystems.Cleveland.OH.US> writes:
> What is the current state of the standard regarding default values for
> template arguments? Specifically, will it be possible to specify a class
> name as a default value for a template argument (along following lines)?
Yes.
Jason