00001 /* -*- C++ -*- 00002 * 00003 * This file is a part of LEMON, a generic C++ optimization library 00004 * 00005 * Copyright (C) 2003-2006 00006 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 00007 * (Egervary Research Group on Combinatorial Optimization, EGRES). 00008 * 00009 * Permission to use, modify and distribute this software is granted 00010 * provided that this copyright notice appears in all copies. For 00011 * precise terms see the accompanying LICENSE file. 00012 * 00013 * This software is provided "AS IS" with no warranty of any kind, 00014 * express or implied, and with no claim as to its suitability for any 00015 * purpose. 00016 * 00017 */ 00018 00019 #ifndef LEMON_INVALID_H 00020 #define LEMON_INVALID_H 00021 00024 00025 namespace lemon { 00026 00028 00030 00031 struct Invalid { 00032 public: 00033 bool operator==(Invalid) { return true; } 00034 bool operator!=(Invalid) { return false; } 00035 bool operator< (Invalid) { return false; } 00036 }; 00037 00039 00042 00043 //const Invalid &INVALID = *(Invalid *)0; 00044 00045 #ifdef LEMON_ONLY_TEMPLATES 00046 const Invalid INVALID = Invalid(); 00047 #else 00048 extern const Invalid INVALID; 00049 #endif 00050 00051 } //namespace lemon 00052 00053 #endif 00054