Maxpm
Maxpm

Reputation: 25642

Braces After Initialization Lists

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.

Upvotes: 1

Views: 171

Answers (2)

Gregor Brandt
Gregor Brandt

Reputation: 7799

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

Upvotes: 4

Oliver Charlesworth
Oliver Charlesworth

Reputation: 272802

No.

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

Upvotes: 5

Related Questions