?
=?ISO-8859-1?Q?Alexander_B=FCrger?=
Hi,
I have a question about operators. I have something similar to the
following code:
//================
// file a.h
class A { ... };
// file op.h
namespace s {
template<typename T>
A& operator<<( A& a, T const& t ) { ...; return a; }
}
// file prog.cxx
void f() {
A a;
int i=0;
a << i;
}
//================
How can I specifiy the namespace for the operator? I tried
a << s:
perator<< i;
but my compiler does not like it and I actually have no idea how it
should be.
Best wishes,
Alexander
I have a question about operators. I have something similar to the
following code:
//================
// file a.h
class A { ... };
// file op.h
namespace s {
template<typename T>
A& operator<<( A& a, T const& t ) { ...; return a; }
}
// file prog.cxx
void f() {
A a;
int i=0;
a << i;
}
//================
How can I specifiy the namespace for the operator? I tried
a << s:
but my compiler does not like it and I actually have no idea how it
should be.
Best wishes,
Alexander