www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12512] New: Feature request: cdup

reply d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12512

           Summary: Feature request: cdup
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: monarchdodra gmail.com



Request for "cdup". Because some const types just can't be cast to either
mutable or immutable.

//----
struct S{int*p;}

void main()
{
    const(S)[] s;
    s.dup; //Nope
    s.idup; //Nope
    s.cdup; //I'd like this.
}
//----

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 03 2014
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12512


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yebblies gmail.com



Shouldn't dup just give you const(T)[] when it can't manage T[] ?

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 03 2014
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12512





 Shouldn't dup just give you const(T)[] when it can't manage T[] ?
That would also work for me I guess. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 03 2014