B
Bruno de Oliveira Schneider
Hello all,
I'm rewriting a C++ framework, so that old prefixed names are replaced
by namespaces. Please consider the following class:
=== boundingbox.h ===
[...]
namespace VART {
class Transform; // forward declaration of class Transform
class BoundingBox {
friend std:stream& operator<<(std:stream& output, const
BoundingBox& box);
public:
[...]
void Transform(const Transform& trans);
[...]
===============
1) I tried "class VART::Transform;" before "namespace VART {" which
gave me compile errors. Is the current declaration ok? Is there a
better way?
2) The output operator is inside namespace VART. Could it be outside?
Users of this framework would fell more confortable if it was...
3) I get "boundingbox.h:36: error: declaration of 'void
VART::BoundingBox::Transform(const VART::Transform&)' transform.h:24:
error: changes meaning of 'Transform' from 'class VART::Transform'"
when compiling on g++. I don't see why VART::BoundingBox::Transform
conflicts with VART::Transform. What could be done here?
I'm rewriting a C++ framework, so that old prefixed names are replaced
by namespaces. Please consider the following class:
=== boundingbox.h ===
[...]
namespace VART {
class Transform; // forward declaration of class Transform
class BoundingBox {
friend std:stream& operator<<(std:stream& output, const
BoundingBox& box);
public:
[...]
void Transform(const Transform& trans);
[...]
===============
1) I tried "class VART::Transform;" before "namespace VART {" which
gave me compile errors. Is the current declaration ok? Is there a
better way?
2) The output operator is inside namespace VART. Could it be outside?
Users of this framework would fell more confortable if it was...
3) I get "boundingbox.h:36: error: declaration of 'void
VART::BoundingBox::Transform(const VART::Transform&)' transform.h:24:
error: changes meaning of 'Transform' from 'class VART::Transform'"
when compiling on g++. I don't see why VART::BoundingBox::Transform
conflicts with VART::Transform. What could be done here?