function overloading fail: since operators clash?


i've got large big formula bottom includes twin sure namespaces: engine application.



the engine defines vector3 category typedef another vector3 class, equivalence operators lay engine namespace, vector3 class. i total category concentration also equivalence operators concentration namespace.



when i attempted compile, separate nonetheless near-by vector3 comparisons unsuccessful since couldn't an suitable equivalence operator. i suspected i causing dispute changed equivalence operators category i added, accumulate succeeded.



// engine.h
namespace engine
{
category vector3impl { ... };
typedef vector3impl vector3;
bool operator==(vector3 const &lhs, vector3 const &rhs) { ... }
}


// myfile.cpp
#include "engine.h"

namespace application
{
category myclass { ... };
bool operator==(myclass const &lhs, myclass const &rhs) { ... }

vacant myfunc(...)
{
( myclassa == myclassb ) { ... } // builds
}

vacant anotherfunc(...)
{
engine::vector3 a, b;
...
( == b ) { ... } // fails
}
}


however after pondering i can't since accumulate failed. there excellent conversions vector3s category vice-versa, argument-dependent look-up should pulling equivalence user engine namespace relating it.



i've attempted reproducing bug illustration c++ digest nonetheless refuses break. there contingency something large big formula bottom causing problem, nonetheless i'm certain where start looking. something opposing beast "using engine"? anyone got any ideas?



Comments

Popular posts from this blog

list macos calm editors formula editors

how i practical urls indicate .aspx pages asp.net deployed an iis? (preferably but iis)

jaxb - xjc - reworking generated typesafe enum category members