On 8/2/14, 5:44 AM, Artur Skawina via Digitalmars-d wrote:
   auto fx(ubyte* p, size_t len) @safe {
       assert_(len>0);
       if (len>=1)
          return p[0];
       return -1;
    }

As an aside I think it's a bug that this function passes @safe. It should not be able to safely dereference the pointer because it may be e.g. just past the end of the array. Has this been submitted as a bug? -- Andrei

Reply via email to