I wrote code with this structure
namespace util { void read (int &); template <typename T> void read (T &); } void foo (); using namespace util; namespace {
In the first line, C did not compile unless I completely qualify it as util::read(i) or the uncommented line B, but this causes line D to crash.
Specialization of using the :: read template is not possible, because the number of arguments is different (up to C ++ 0x).
Including A string in namespace util not an option because I don't want to export a new read .
I could rename read(MyType&,int) , but that violates the ahm style.
Is there a way to make these cross-overloads useful? Is there a good reason they shouldn't?
source share