author | marci |
Wed, 17 Mar 2004 15:01:04 +0000 | |
changeset 193 | 84c19824322a |
parent 169 | 940b13aba5ff |
child 242 | b255f25ad394 |
permissions | -rw-r--r-- |
alpar@162 | 1 |
// -*- mode:C++ -*- |
alpar@162 | 2 |
|
alpar@162 | 3 |
#ifndef HUGO_INVALID_H |
alpar@162 | 4 |
#define HUGO_INVALID_H |
alpar@162 | 5 |
|
alpar@162 | 6 |
namespace hugo { |
alpar@162 | 7 |
|
alpar@162 | 8 |
/// Dummy type to make it easier to make invalid iterators. |
alpar@162 | 9 |
|
alpar@162 | 10 |
/// See \ref INVALID, how to use it. |
alpar@162 | 11 |
|
alpar@162 | 12 |
struct Invalid {}; |
alpar@162 | 13 |
|
alpar@162 | 14 |
/// Invalid iterators. |
alpar@162 | 15 |
|
alpar@162 | 16 |
/// \ref Invalid is a global type that converts to each iterator |
alpar@162 | 17 |
/// in such a way that the value of the target iterator will be invalid. |
alpar@184 | 18 |
|
alpar@184 | 19 |
// It is also used to convert the \c INVALID constant to the |
alpar@184 | 20 |
// node iterator that makes is possible to write |
alpar@184 | 21 |
|
alpar@165 | 22 |
//extern Invalid INVALID; |
alpar@162 | 23 |
|
klao@169 | 24 |
//const Invalid &INVALID = *(Invalid *)0; |
klao@169 | 25 |
const Invalid INVALID = Invalid(); |
alpar@162 | 26 |
|
alpar@162 | 27 |
}; |
alpar@162 | 28 |
|
alpar@162 | 29 |
#endif |
alpar@162 | 30 |