Re: [eigen] Leading underscroes

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Interesting - didn't realize there would be issues at class scope. Now I apparently need to gradually migrate all my code to a different style... perhaps there will be a Clang-based tool I can use to automate this.

I concur on the topic of the template parameters - I was just showing the workaround I had to do.

Ryan


On Tue, Jul 30, 2013 at 1:48 PM, Hauke Heibel <hauke.heibel@xxxxxxxxx> wrote:
On Tue, Jul 30, 2013 at 7:54 PM, Ryan Pavlik <rpavlik@xxxxxxxxxxx> wrote:
Note that the single-leading-underscore reservation is for the global namespace.

Only under the second bullet point is the global namespace mentioned. The first bullet point which also covers cases as '_X' says reserved for "any use". It might work for private members but does not have to.

The case I referred to actually caused an error at class scope (see here for the change and here for the errors the name caused).

(While we're on the topic of collisions, I ran into one when porting Eigen to AVR: the use of B0, etc. as template parameters collided with the unfortunate use of them as preprocessor macros for binary.

I would change the occurrences of such types/typedefs and provide more descriptive names. It should be easier to read and reduce the chances of collisions.

Regards,
Hauke



--
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

rpavlik@xxxxxxxxxxx
http://academic.cleardefinition.com


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/