all OS functions should be "nothrow @trusted @nogc"
Timon Gehr via Digitalmars-d
digitalmars-d at puremagic.com
Tue Jul 25 17:46:22 PDT 2017
On 26.07.2017 02:45, Timon Gehr would have liked to have written:
> ...
> What Moritz is saying is that the following implementation of fclose is
> correct according to the C standard:
>
> int fclose(FILE *stream){
> if(stream == NULL){
> return go_wild_and_corrupt_all_the_memory();
> }else{
> return actually_close_the_file(stream);
> }
> }
(Forgot the returns.)
More information about the Digitalmars-d
mailing list