Changeset 1105 for XIOS/trunk/src/type/enum_impl.hpp
- Timestamp:
- 04/25/17 10:57:48 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/type/enum_impl.hpp
r680 r1105 249 249 << "Enum is not initialized."); 250 250 } 251 252 251 252 template <typename T> 253 bool operator== (const CEnum<T>& lhs, const typename T::t_enum& rhs) 254 { 255 if (lhs.isEmpty()) return false; 256 return (lhs.get() == rhs); 257 } 258 259 template <typename T> 260 bool operator== (const typename T::t_enum& lhs, const CEnum<T>& rhs) 261 { 262 return rhs == lhs; 263 } 264 265 template <typename T> 266 bool operator== (const CEnum<T>& lhs, const CEnum<T>& rhs) 267 { 268 if ((lhs.isEmpty() && !rhs.isEmpty()) || (!lhs.isEmpty() && rhs.isEmpty())) return false; 269 if (lhs.isEmpty() && rhs.isEmpty()) return true; 270 return (lhs.get() == rhs.get()); 271 } 272 273 253 274 template <typename T> 254 275 CBufferOut& operator<<(CBufferOut& buffer, const CEnum<T>& type)
Note: See TracChangeset
for help on using the changeset viewer.