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