namespaces user overloading c++


when authoring library sole namespace, it's mostly accessible yield overloaded operators classes namespace. seems (at slightest g++) overloaded operators implemented presumably library's namespace:



namespace lib {
class {
};

a operator+(const a&, const a&);
} // namespace lib


or tellurian namespace



namespace lib {
class {
};
} // namespace lib

lib::a operator+(const lib::a&, const lib::a&);


from testing, both seem work fine. there any receptive inadequacy between twin options? presumably proceed better?



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