[linux] OT: g++2.95/3.2 and ambiguous overload
Jozef Kosoru
zyzstar na uid0.sk
Pondělí Prosinec 2 15:00:03 CET 2002
> #include <iostream>
>
> using namespace std;
>
> class AmbigTest {
> public:
> template<class C>
> AmbigTest& operator<<(const C& c)
> {
> cerr << c;
> return *this;
> }
>
> template<class C>
> AmbigTest& operator<<(const C c)
> {
> cerr << c;
> return *this;
> }
> };
>
> int main() {
> AmbigTest test;
>
> test << "This is an AmbigTest" << endl;
>
> }
Povedz mi aspon jeden pripad, kedy nemozes pouzit
const referenciu...
--
jozef kosoru [zyzstar] <zyzstar na uid0.sk>
Další informace o konferenci linux