Template namespaces - Obsolete?
Walter Bright
newshound1 at digitalmars.com
Wed Sep 19 17:28:50 PDT 2007
Janice Caron wrote:
> Now that we can do:
> class A(T);
> struct A(T);
> union A(T);
> T func(T)(T x);
> static int func(int n);
> ...
> etc.
>
> Is there any need, any more, for the old fashioned
>
> template t(T)
> {
> int f();
> int g();
> }
>
> and having to refer to t!(T).f() and t!(T).g() ?
Yes. It makes sense to logically group related templates together,
instead of the C++ ad-hoc approach where a file has a mess of arbitrary
looking templates, and no organizational cues as to which ones belong
together.
More information about the Digitalmars-d
mailing list