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


--- Comment #0 from monarchdodra gmail.com 2014-04-03 02:39:36 PDT ---
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


--- Comment #1 from yebblies <yebblies gmail.com> 2014-04-03 21:58:26 EST ---
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



--- Comment #2 from monarchdodra gmail.com 2014-04-03 04:09:21 PDT ---
(In reply to comment #1)
 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