Declarations and definitions of Invalid and INVALID
authoralpar
Wed, 10 Mar 2004 16:43:50 +0000
changeset 162abfae454c3b5
parent 161 743fa50c442e
child 163 c5fbd2c1d75f
Declarations and definitions of Invalid and INVALID
src/work/alpar/invalid.h
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/work/alpar/invalid.h	Wed Mar 10 16:43:50 2004 +0000
     1.3 @@ -0,0 +1,26 @@
     1.4 +// -*- mode:C++ -*-
     1.5 +
     1.6 +#ifndef HUGO_INVALID_H
     1.7 +#define HUGO_INVALID_H
     1.8 +
     1.9 +namespace hugo {
    1.10 +
    1.11 +  /// Dummy type to make it easier to make invalid iterators.
    1.12 +  
    1.13 +  /// See \ref INVALID, how to use it.
    1.14 +  
    1.15 +  struct Invalid {};
    1.16 +  
    1.17 +  /// Invalid iterators.
    1.18 +  
    1.19 +  /// \ref Invalid is a global type that converts to each iterator
    1.20 +  /// in such a way that the value of the target iterator will be invalid.
    1.21 +  
    1.22 +  ///extern Invalid INVALID;
    1.23 +
    1.24 +  const Invalid &INVALID = *(Invalid *)0;
    1.25 +
    1.26 +};
    1.27 +
    1.28 +#endif
    1.29 +