[ROOT] operator >> in namespaces

From: Axel Naumann (axel@fnal.gov)
Date: Wed Jul 11 2001 - 01:37:43 MEST


Hi,

I run into the following problem when trying to compile the dictionary for
this "namespaced" class:

---
namespace mynamespace{
class MyClass{
public:
MyClass(){};
~MyClass(){};
int i;

ClassDef(MyClass,1)
};
}
---

Building the dict with this linkdef.h

---
#ifndef _INCLUDE_LINKDEF
#define _INCLUDE_LINKDEF

#ifdef __CINT__

#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;

#pragma link C++ nestedclass;
#pragma link C++ nestedtypedef;
#pragma link C++ namespace mynamespace;

#pragma link C++ class mynamespace::MyClass+;
#endif
#endif
---

and compiling it with KCC 4.0d on IRIX 6.5 I get the following error:
"mydictfile.cpp", line 17: error #135: namespace "mynamespace"
          has no member "operator>>"
  TBuffer &mynamespace::operator>>(TBuffer &buf, mynamespace::MyClass *&obj)
                        ^

Too bad KCC is so picky, Win MSVC++ and GCC don't care about that. Any idea
what I could do (to get it compiled under KCC, that is)? Btw, does this
operator _have_ to be in the namespace?

Cheers, Axel.



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:51 MET