> * * *C++98 17.4.3.6/2, about standard library containers:
> * * *"In particular, the effects are undefined in the following cases:
> * * * [blah blah]
> * * * - if an incomplete type (3.9) is used as a template argument when
> * * * * instantiating a template component"
Yes but Alf I am only interested in legality of declaration, not
definition (nor instantiation).
I can assure you that at the point when I call the function, the full
definition of FooBar will be available.
I am trying to minimise the amount of header file inclusion by forward
declaring items as much as possible.
I know that it perfectly legal for non-template class/struct/union
parameters (but interestingly enum is left out (any aficionado saying
that size matters here is wrong, if it does not matter for class/
struct/union, it should not matter for enum; enum has been
overlooked)).
I was just discussing the legality of template container parameters
where the containing type is incomplete, and as others have concluded,
it is legal.
That just leaves std::string and similar where unfortunately you do
have to do have to do #include <string>, you cannot forward declare.
And I do know about header file <iosfwd> which is useful to know (wish
other std:

bject types had a fwd header).
Thanks
Stephen Howe