Braces After Initialization Lists

160 views Asked by At
class Foo
{
    Foo(double InitValue): StoredDouble(InitValue)
    {
    }

    double StoredDouble;
}

Is there a syntax that will allow me to skip out on the curly braces after the initialization list? I know it's a minor thing, but I'd like to be as concise as possible in my code.

2

There are 2 answers

0
Gregor Brandt On BEST ANSWER

No, because Foo( double InitValue ) is actually a method and all methods must have opening and closing braces.

0
Oliver Charlesworth On

No.

[[Excess padding to make my answer 30 characters long]]