Menu

Friend os DLIterC class

2003-08-02
2003-08-04
  • Alexey Kostin

    Alexey Kostin - 2003-08-02

    What is the idea of defining
         friend class DListBodyC<DataT>;
    #if RAVL_NEW_ANSI_CXX_DRAFT
        friend ostream &operator<< <DataT>(ostream &strm,const DListBodyC<DataT> &lst);
        friend BinOStreamC &operator<< <DataT>(BinOStreamC &strm,const DListBodyC<DataT> &lst);
    #else
        friend ostream &operator<<(ostream &strm,const DListBodyC<DataT> &lst);
        friend BinOStreamC &operator<<(BinOStreamC &strm,const DListBodyC<DataT> &lst);
    #endif
    in DLiterC class?

     
    • Charles Galambos

      There are two different, incompatible ways of defining friends of templates.   Unfortunatly the IRIX mips (and visual c++?) compilers uses the old one, and gcc uses the new stanard. Hence the need for this define.  Hopefully as they update the compilers it will go away.....  

       
    • Alexey Kostin

      Alexey Kostin - 2003-08-04

      The question was: Is it necessary to to define the friends at all? Which function uses protected or private members of DLIterC?

       

Log in to post a comment.