deba@378: // -*- mode:C++ -*- deba@378: deba@378: #ifndef HUGO_INVALID_H deba@378: #define HUGO_INVALID_H deba@378: deba@378: ///\file deba@378: ///\brief Definition of INVALID. deba@378: deba@378: namespace hugo { deba@378: deba@378: /// Dummy type to make it easier to make invalid iterators. deba@378: deba@378: /// See \ref INVALID, how to use it. deba@378: deba@378: struct Invalid {}; deba@378: deba@378: /// Invalid iterators. deba@378: deba@378: /// \ref Invalid is a global type that converts to each iterator deba@378: /// in such a way that the value of the target iterator will be invalid. deba@378: deba@378: // It is also used to convert the \c INVALID constant to the deba@378: // node iterator that makes is possible to write deba@378: deba@378: //extern Invalid INVALID; deba@378: deba@378: //const Invalid &INVALID = *(Invalid *)0; deba@378: const Invalid INVALID = Invalid(); deba@378: deba@378: }; deba@378: deba@378: #endif deba@378: