Boost logo

Boost :

Subject: Re: [boost] [local] this_ or _this?
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2011-04-04 01:13:23


On Sun, Apr 3, 2011 at 1:12 PM, Joshua Juran <jjuran_at_[hidden]> wrote:
> On Apr 3, 2011, at 12:22 PM, Emil Dotchevski wrote:
>
>> On Sun, Apr 3, 2011 at 11:13 AM, Lorenzo Caminiti <lorcaminiti_at_[hidden]>
>> wrote:
>>>
>>> Hello all,
>>>
>>> Boost.Local uses a special name `this_` to access the object `this`
>>> bound from the enclosing scope. Shall this name be `this_` or `_this`
>>> according to Boost practices?
>>
>> Names with leading underscore should be avoided, they may be used by
>> the compiler for its own needs.
>
> A name beginning with an underscore not followed by a capital letter is
> allowable at non-global scope (provided it doesn't contain two consecutive
> underscores).  Such names include _, _1, and _this.

Granted, it is very unlikely _this to be used by the implementation,
but I've seen compilers defining macros with leading underscore
followed by a lowercase letter. There is no reason to insist on using
leading underscores, in global scope or not.

Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode


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