[Bug c++/60201] New: Issue with CRTP generation under 4.8.1

2014-02-14 Thread andrew.stern at itg dot com
++ Assignee: unassigned at gcc dot gnu.org Reporter: andrew.stern at itg dot com I created a CRTP (Curiously recurring template pattern) and added non-static member variables to my base class and that works without issue. But when I add non-static variables to the subclass instance the

[Bug c++/60201] Issue with CRTP generation under 4.8.1

2014-02-14 Thread andrew.stern at itg dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60201 --- Comment #2 from Andrew Stern --- >>Is this valid as *this at this point is just a Baseclass type (and does not >>have a Subclass type. I believe the code to be valid since the template generates both the Baseclass and Subclass. The Subclass

[Bug c++/60201] Issue with CRTP generation under 4.8.1

2014-02-14 Thread andrew.stern at itg dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60201 --- Comment #4 from Andrew Stern --- Since the examples that I found for CRTP seem to indicate a line very much like this could you perhaps suggest the correct method to get and call the Subclass object from the Baseclass object?

[Bug c++/60201] Issue with CRTP generation under 4.8.1

2014-02-14 Thread andrew.stern at itg dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60201 --- Comment #5 from Andrew Stern --- It seems that if I change my code From: Baseclass, ParamOne, ParamTwo> test; To: Subclass test; Then it seems to work. This produces the following output: The this pointer is 7fffddafc360 with a s

[Bug c++/60201] Issue with CRTP generation under 4.8.1

2014-02-14 Thread andrew.stern at itg dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60201 --- Comment #6 from Andrew Stern --- Thank you for your help.