src/work/deba/invalid.h
author deba
Thu, 22 Apr 2004 20:36:21 +0000
changeset 378 c3f93631cd24
permissions -rw-r--r--
(none)
deba@378
     1
// -*- mode:C++ -*-
deba@378
     2
deba@378
     3
#ifndef HUGO_INVALID_H
deba@378
     4
#define HUGO_INVALID_H
deba@378
     5
deba@378
     6
///\file
deba@378
     7
///\brief Definition of INVALID.
deba@378
     8
deba@378
     9
namespace hugo {
deba@378
    10
deba@378
    11
  /// Dummy type to make it easier to make invalid iterators.
deba@378
    12
  
deba@378
    13
  /// See \ref INVALID, how to use it.
deba@378
    14
  
deba@378
    15
  struct Invalid {};
deba@378
    16
  
deba@378
    17
  /// Invalid iterators.
deba@378
    18
  
deba@378
    19
  /// \ref Invalid is a global type that converts to each iterator
deba@378
    20
  /// in such a way that the value of the target iterator will be invalid.
deba@378
    21
deba@378
    22
  // It is also used to convert the \c INVALID constant to the
deba@378
    23
  // node iterator that makes is possible to write 
deba@378
    24
deba@378
    25
  //extern Invalid INVALID;
deba@378
    26
deba@378
    27
  //const Invalid &INVALID = *(Invalid *)0;
deba@378
    28
  const Invalid INVALID = Invalid();
deba@378
    29
deba@378
    30
};
deba@378
    31
deba@378
    32
#endif
deba@378
    33