Ignore:
Timestamp:
06/06/17 17:58:16 (7 years ago)
Author:
oabramkina
Message:

Two server levels: merging with trunk r1137.
There are bugs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_olga/src/type/type.hpp

    r748 r1158  
    9494    const CType_ref& operator = (CType<T>& val) const ; 
    9595    const CType_ref& operator = (const CType_ref& val) const; 
    96     operator T&() const; 
     96    operator T&() const;     
    9797 
    9898    inline virtual CBaseType* clone(void) const   { return _clone(); } 
     
    127127    size_t _size(void) const ; 
    128128  } ; 
     129 
     130  template <typename T> bool operator==(const CType<T>& lhs, const T& rhs);    
     131  template <typename T> bool operator==(const T& lhs, const CType<T>& rhs);    
     132  template <typename T> bool operator==(const CType_ref<T>& lhs, const T& rhs);    
     133  template <typename T> bool operator==(const T& lhs, const CType_ref<T>& rhs);  
     134  template <typename T> bool operator==(const CType<T>& lhs, const CType<T>& rhs);  
     135  template <typename T> bool operator==(const CType_ref<T>& lhs, const CType_ref<T>& rhs);  
     136 
     137  template <typename T> 
     138  bool operator==(const CType_ref<T>& lhs, const CType<T>& rhs) 
     139  { 
     140    if ((lhs.isEmpty() && !rhs.isEmpty()) || (!lhs.isEmpty() && rhs.isEmpty())) return false; 
     141    if (lhs.isEmpty() && rhs.isEmpty()) return true; 
     142    return (*lhs.ptrValue == *rhs.ptrValue); 
     143  }  
     144 
     145  template <typename T> 
     146  bool operator==(const CType<T>& lhs, const CType_ref<T>& rhs) 
     147  { 
     148    return (rhs == lhs); 
     149  } 
    129150 
    130151 
Note: See TracChangeset for help on using the changeset viewer.