Const initialization issue, looking for solution

Jonathan M Davis jmdavisProg at gmx.com
Wed May 29 12:12:35 PDT 2013


On Wednesday, May 29, 2013 15:08:24 Jonathan M Davis wrote:
> Wrap the try-catch in a function.
> 
> int foo()
> {
> int initI()
> {
> try
> return createTheVar();
> catch(Exception e)
> return int.init;
> }

Ouch, my e-mail client ate the indentation. That should be

    int initI()
    {
        try
            return createTheVar();
        catch(Exception e)
            return int.init;
    }

- Jonathan M Davis


More information about the Digitalmars-d mailing list