00001 /* -*- C++ -*- 00002 * src/lemon/invalid.h - Part of LEMON, a generic C++ optimization library 00003 * 00004 * Copyright (C) 2004 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 00005 * (Egervary Combinatorial Optimization Research Group, EGRES). 00006 * 00007 * Permission to use, modify and distribute this software is granted 00008 * provided that this copyright notice appears in all copies. For 00009 * precise terms see the accompanying LICENSE file. 00010 * 00011 * This software is provided "AS IS" with no warranty of any kind, 00012 * express or implied, and with no claim as to its suitability for any 00013 * purpose. 00014 * 00015 */ 00016 00017 #ifndef LEMON_INVALID_H 00018 #define LEMON_INVALID_H 00019 00022 00023 namespace lemon { 00024 00026 00028 00029 struct Invalid { 00030 public: 00031 bool operator==(Invalid) { return true; } 00032 bool operator!=(Invalid) { return false; } 00033 bool operator< (Invalid) { return false; } 00034 }; 00035 00037 00040 00041 // It is also used to convert the \c INVALID constant to the 00042 // node iterator that makes is possible to write 00043 00044 //extern Invalid INVALID; 00045 00046 //const Invalid &INVALID = *(Invalid *)0; 00047 const Invalid INVALID = Invalid(); 00048 00049 } //namespace lemon 00050 00051 #endif 00052