Boost logo

Boost :

Subject: Re: [boost] [local_function] End scope function name declaration makes code hard to read.
From: Mostafa (mostafa_working_away_at_[hidden])
Date: 2013-03-18 18:09:32


On Mon, 18 Mar 2013 08:43:34 -0700, Lorenzo Caminiti
<lorcaminiti_at_[hidden]> wrote:

[snip]

> Mostafa, on which compiler did you try to compile the "dangling
> definition" above in a local scope? As Steven also pointed out,
> unfortunately this is not valid C++:
>
> int main()
> { // local scope
> struct local_add
> {
> inline void body();
> };
> inline void local_add::body() // Invalid :(
> {
> }
> return 0;
> }

Yes, you're both right. I was too hasty with that suggestion and didn't
test it before posting it. Which is funny, because it's the third time I
made that very same mistake ...


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk