Re: [eigen] Leading underscroes |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen <eigen@xxxxxxxxxxxxxxxxxxx>
- Subject: Re: [eigen] Leading underscroes
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Tue, 30 Jul 2013 14:39:32 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=zCRTSfpJbRcaRyY8SphSTOfmYn/TJctli1ntIv06qok=; b=pz4qIJd2jC7UVxv+z+8j14bTGQwg2iGe3mht5IwAcar/Dkch3eqXWgd5UXbLAOqYKK TpJxzsD9fd8LuOKjcwVf/jkmJvVmU678vmPOShm5w8NNIKOGRzRQcFLOAZUEvP59YwcL aLm3oL1ghbGNDXZ1LaGi3+uqXqA9lqYYTtsU0NM9D+9CTfzOeKWrbdXi4Me9deQ40qCr gtllJ+YWPN1x0w/trzvbUZn44qbuQfn6j7GUJvYpYzMxjxLpiZF32zM0ZjmVJc898IXl jNArA8wDhVgB4fIEd3riLOiFO8akh1wkhfbjPB6GQDaNfsOk/YADJBrfm/AoGRzEfsMn NOQQ==
Hi,
I agree, we've been too easy on that. A simple:
grep -e "[ (,_]_[a-zA-Z0-9]" Eigen/* -R
tells me there are numerous such occurences!
gael
On Tue, Jul 30, 2013 at 8:10 AM, Hauke Heibel <hauke.heibel@xxxxxxxxx> wrote:
> Hi,
>
> I want to suggest that we refrain from using leading underscores in the
> future because of clause 17.4.3.1.2/1 which states that ...
>
> Certain sets of names and function signatures are always reserved to the
> implementation:
>
> * Each name that contains a double underscore (_ _) or begins with an
> underscore followed by an upper-case letter (2.11) is reserved to the
> implementation for any use.
> * Each name that begins with an underscore is reserved to the implementation
> for use as a name in the global namespace.
>
> In particular the first bullet point can lead to issues and did so on Cygwin
> which did not like the variable name _X. My suggestion to completely stop
> using leading underscores is just a precaution in order to prevent any
> future issues.
>
> Regards,
> Hauke