diff -r 236117f60eee -r c03e073b8394 src/work/deba/invalid.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/work/deba/invalid.h Wed Jul 14 10:06:27 2004 +0000 @@ -0,0 +1,38 @@ +// -*- mode:C++ -*- + +#ifndef HUGO_INVALID_H +#define HUGO_INVALID_H + +///\file +///\brief Definition of INVALID. + +namespace hugo { + + /// Dummy type to make it easier to make invalid iterators. + + /// See \ref INVALID, how to use it. + + struct Invalid { + public: + bool operator==(Invalid) { return true; } + bool operator!=(Invalid) { return false; } + bool operator< (Invalid) { return false; } + }; + + /// Invalid iterators. + + /// \ref Invalid is a global type that converts to each iterator + /// in such a way that the value of the target iterator will be invalid. + + // It is also used to convert the \c INVALID constant to the + // node iterator that makes is possible to write + + //extern Invalid INVALID; + + //const Invalid &INVALID = *(Invalid *)0; + const Invalid INVALID = Invalid(); + +} //namespace hugo + +#endif +