Rev | Line | |
---|
[162] | 1 | // -*- mode:C++ -*- |
---|
| 2 | |
---|
| 3 | #ifndef HUGO_INVALID_H |
---|
| 4 | #define HUGO_INVALID_H |
---|
| 5 | |
---|
| 6 | namespace hugo { |
---|
| 7 | |
---|
| 8 | /// Dummy type to make it easier to make invalid iterators. |
---|
| 9 | |
---|
| 10 | /// See \ref INVALID, how to use it. |
---|
| 11 | |
---|
| 12 | struct Invalid {}; |
---|
| 13 | |
---|
| 14 | /// Invalid iterators. |
---|
| 15 | |
---|
| 16 | /// \ref Invalid is a global type that converts to each iterator |
---|
| 17 | /// in such a way that the value of the target iterator will be invalid. |
---|
[184] | 18 | |
---|
| 19 | // It is also used to convert the \c INVALID constant to the |
---|
| 20 | // node iterator that makes is possible to write |
---|
| 21 | |
---|
[165] | 22 | //extern Invalid INVALID; |
---|
[162] | 23 | |
---|
[169] | 24 | //const Invalid &INVALID = *(Invalid *)0; |
---|
| 25 | const Invalid INVALID = Invalid(); |
---|
[162] | 26 | |
---|
| 27 | }; |
---|
| 28 | |
---|
| 29 | #endif |
---|
| 30 | |
---|
Note: See
TracBrowser
for help on using the repository browser.