Hi Ryan,

On Wed, Jun 22, 2011 at 6:35 PM, Ryan Pavlik <[email protected]> wrote:
> Yes, of course - for some time I was confused on how a visitor could be
> implemented _without_ triggering this warning.

You can''t implement a vistor pattern without triggering the warning. Since the
vistor pattern is such a powerful and widely used design pattern is
pretty poor that
the warning flags it as problem.

> Yes, when thinking through it, I couldn't think of an instance in which it
> would affect use, since Visitors are generally only handled by a base class
> reference, but the warning was the most frequent.
> I'm unsure I understand your thoughts on a resolution - are you saying we
> should add "usingĀ osg::NodeVisitor::apply;" or that we should ignore the
> warning?

In the context of visitor this warning is false positive, so doing
anything to the
code just to quieten this false positive is a false positive.  How much effort
should one spend quietening false positives?  What risks are their in
doing this?

Personally I'd just disable the warning.  Ideally you'd be able to do
this right in
the base class so that you don't have to disable it for other places where the
warning might be approrpiate.  Failing the ability disable the warning just for
a single class and it's subclasses one would have to disable the warning at
the compile level.

For 3.0.0 I'm not going to start chasing stuff like how to quieten
down false positives,
unless it's as single as CMake option or a #pragma added to an OSG header.  It's
both an issue of where do I spend me time now to maximize the final
software quality
and what risks we take with the code so close to a risk.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to