Re: pointer member constant expression

2006-02-27 Thread Perry Smith
On Feb 27, 2006, at 11:35 AM, Joe Buck wrote: On Mon, Feb 27, 2006 at 12:00:42PM -, Dave Korn wrote: It has been illegal to initialise a static class member inside the class definition since sometime back in the early 90s. You must provide a static instantiation elsewhere and initiali

Re: pointer member constant expression

2006-02-27 Thread Joe Buck
On Mon, Feb 27, 2006 at 12:00:42PM -, Dave Korn wrote: > It has been illegal to initialise a static class member inside the class > definition since sometime back in the early 90s. You must provide a static > instantiation elsewhere and initialise that. g++ used to allow in-class-definition

Re: pointer member constant expression

2006-02-27 Thread Perry Smith
Thank you and apologies to all. I simply never looked at paragraph 1 of 5.19. I just (for some reason) jumped over it. But it says (as you state) that there is a difference between. I discovered this yesterday but didn't want to add more noise to the mailing list. Again -- thanks and s

RE: pointer member constant expression

2006-02-27 Thread Dave Korn
On 24 February 2006 23:42, Perry Smith wrote: > On Feb 24, 2006, at 8:55 AM, Richard Guenther wrote: >>> The problem is this: >>> >>> struct foo { >>> int a; >>> int b; >>> int c; >>> }; >>> >>> static const int foo::*j = &foo::c; // accepted >>> >>> class do

Re: pointer member constant expression

2006-02-24 Thread Perry Smith
On Feb 24, 2006, at 8:55 AM, Richard Guenther wrote: On 2/24/06, Perry Smith <[EMAIL PROTECTED]> wrote: I have asked this question before -- maybe to the gcc-help list but I'm still unclear. The problem is this: struct foo { int a; int b; int c; }; static const int foo::*j =

Re: pointer member constant expression

2006-02-24 Thread Richard Guenther
On 2/24/06, Perry Smith <[EMAIL PROTECTED]> wrote: > I have asked this question before -- maybe to the gcc-help list but > I'm still unclear. > > The problem is this: > > struct foo { > int a; > int b; > int c; > }; > > static const int foo::*j = &foo::c; // accep

pointer member constant expression

2006-02-24 Thread Perry Smith
I have asked this question before -- maybe to the gcc-help list but I'm still unclear. The problem is this: struct foo { int a; int b; int c; }; static const int foo::*j = &foo::c; // accepted class dog { static const int foo::*k = &foo::c; // error }; 5.