[phobos] I applied @safe, @trusted, @system to Phobos!

Walter Bright walter at digitalmars.com
Sat May 22 20:12:49 PDT 2010



SHOO wrote:
>
> 6. You must make the template function @trusted by all means
>     When you use template, type that is maked @system may be handed to
> parameters.
>     Therefore @trusted is required.
>     This means that every template functions cannot take benefits from
> @safe.
>   

One possibility is to have the template function 'inherit' its default 
safety attribute from its arguments.

> 7. Some mysterious compile errors
>     When @safe unittest...
>     Some functions are going to call opAssign. (eg: std.range(2670))
>     Some functions are going to call __cpctor. (eg: std.stdio(165))
>     Some functions are going to call ~this. (eg: std.stdio(872))
>     (I try compile command: "dmd -I.. -c -o- -unittest -debug stdio.d")
>
>   

I don't know about this.


More information about the phobos mailing list