www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18167] New: std.array.appender should be usable in safe

https://issues.dlang.org/show_bug.cgi?id=18167

          Issue ID: 18167
           Summary: std.array.appender should be usable in  safe
           Product: D
           Version: D2
          Hardware: x86_64
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: greensunny12 gmail.com

void test  safe
{
    import std.array;

    struct S
    {
        void opAssign(S)
        {
        }
    }

    auto a1 = Appender!(const(S)[])();
    auto s1 = const(S)();
    a1.put(s1);
}

onlineapp.d(14): Error:  safe function 'onlineapp.test' cannot call  system
function 'std.array.Appender!(const(S)[]).Appender.put!(const(S)).put'

--
Jan 02