Changeset 351:01fb9da7a363 in lemon-0.x
- Timestamp:
- 04/17/04 21:54:04 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@470
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/work/alpar/rw_nonref_map.cc
r342 r351 44 44 }; 45 45 46 template<class K,class T> 47 class NullMap 48 { 49 public: 50 typedef K KeyType; 51 typedef T ValueType; 52 53 class RefType 54 { 55 ValueType val; 56 public: 57 RefType(ValueType v) : val(v) { } 58 operator ValueType() const { return val; } 59 ValueType operator = (ValueType v) const { return val; } 60 }; 61 62 private: 63 ValueType val; 64 public: 65 NullMap(ValueType v) : val(v) { } 66 RefType operator[] (KeyType e) const { return RefType(v);} 67 }; 68 46 69 int main() 47 70 {
Note: See TracChangeset
for help on using the changeset viewer.