[Issue 5325] Mutable references to const/immutable/shared classes

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jul 24 05:22:54 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=5325



--- Comment #3 from Michel Fortin <michel.fortin at michelf.com> 2013-07-24 08:22:53 EDT ---
(In reply to comment #2)
> How about making a distinction between const(Object) and const Object?
> I think it would be less intrusive and more in line with the const(void)* vs.
> const void* behavior.

That'll only work in the context where you're declaring a tail-const variable
of type Object. If you're declaring an array of tail-const objects, or passing
a tail-const object as a template parameter, you can't omit the parenthesis.
But the ref postfix works:

   const(Object)ref[] arrayOfTailConstObjects;

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list