Latest const expansion

0ffh spam at frankhirsch.net
Tue Sep 11 14:59:15 PDT 2007


Bill Baxter wrote:
> const(T) - type constructor making both head/tail const version of T
> const*(T) - type constructor making tail const version of T
> const**(T) - type constructor making tail-of-tail const version of T

++vote;

> I'm not so sure I like using const&(T) to mean head const, though.  It 
> doesn't really seem right for some reason.

A couple of suggestions for T const, *T mutable:

  1) *const(T) - "reverse" of the suggested tail const syntax

  2) mutable*(const(T)) - a bit keyboard intensive, but nicely obvious

Regards, Frank



More information about the Digitalmars-d mailing list