[LC++]Why new behaviour of g++?

Jack Lloyd lloyd at randombit.net
Thu Feb 17 02:37:01 UTC 2005


On Wed, Feb 16, 2005 at 06:47:08PM +1030, Dr Mark H Phillips wrote:
> 
> and foo1() seems to be pretty much what I was unsuccessfully trying to 
> do!  But why does g++ now outlaw this?  Presumably the answer lies in
> 14.6.2 of the standard, but I do not have a copy of this and I can't
> find it anywhere on the web.

You can find a fairly late draft at
   http://people.msoe.edu/~sebern/resource/ansicpp/

The standard itself is pay-only, but the drafts were public, you can find
copies online in various places. This was the most recent I found out of the 3
or 4 I could find easily with Google.

> Can anyone enlighten me on what is happening here and why this kind of access
> to base-class members has been outlawed??

No rationale is given by the standard. My guess would be it prevents some
corner cases with regards to what gets bound to an identifier inside a
template.

-Jack




More information about the tuxCPProgramming mailing list