author | alpar |
Wed, 10 Mar 2004 17:47:54 +0000 | |
changeset 164 | 970b265696b0 |
child 165 | 9b078bc3ce13 |
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@162 | 18 |
|
alpar@162 | 19 |
///extern Invalid INVALID; |
alpar@162 | 20 |
|
alpar@162 | 21 |
const Invalid &INVALID = *(Invalid *)0; |
alpar@162 | 22 |
|
alpar@162 | 23 |
}; |
alpar@162 | 24 |
|
alpar@162 | 25 |
#endif |
alpar@162 | 26 |