
Bruno MartÃnez <br1@internet.com.uy> writes:
On Thu, 17 Nov 2005 12:32:59 -0200, Michael Goldshteyn <mgoldshteyn@comcast.net> wrote:
"Bruno MartÃnez" <br1@internet.com.uy> wrote in message news:op.s0c8nu06551aze@yoda...
On Wed, 16 Nov 2005 16:56:00 -0200, Michael Goldshteyn <mgoldshteyn@comcast.net> wrote: I think you can forward declare Action ate the top and define it later. You end up with vector<Action> in arguments. I know that using standard classes with incomplete types is not guaranteed to work, but I'm not sure if mentioning it as a parameter is a 'use'.
Maybe this thread should be moved to c.l.c++.moderated.
Bruno
You cannot forward declare a type used as a value for vector.
Yes, I know. However, not fully using such instantiation, as is the case, seems somewhat less wrong.
It's not a question of "fully using." If the vector type is instantiated before the parameter is fully defined, it's an error. Otherwise, you're OK. The forward declaration technique can be used legally in many scenarios. -- Dave Abrahams Boost Consulting www.boost-consulting.com