lemon/bits/invalid.h
changeset 220 a5d8c039f218
parent 217 b67149f0e675
child 221 64613d8fae28
     1.1 --- a/lemon/bits/invalid.h	Mon Jul 14 15:40:24 2008 +0100
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,55 +0,0 @@
     1.4 -/* -*- mode: C++; indent-tabs-mode: nil; -*-
     1.5 - *
     1.6 - * This file is a part of LEMON, a generic C++ optimization library.
     1.7 - *
     1.8 - * Copyright (C) 2003-2008
     1.9 - * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    1.10 - * (Egervary Research Group on Combinatorial Optimization, EGRES).
    1.11 - *
    1.12 - * Permission to use, modify and distribute this software is granted
    1.13 - * provided that this copyright notice appears in all copies. For
    1.14 - * precise terms see the accompanying LICENSE file.
    1.15 - *
    1.16 - * This software is provided "AS IS" with no warranty of any kind,
    1.17 - * express or implied, and with no claim as to its suitability for any
    1.18 - * purpose.
    1.19 - *
    1.20 - */
    1.21 -
    1.22 -#ifndef LEMON_BITS_INVALID_H
    1.23 -#define LEMON_BITS_INVALID_H
    1.24 -
    1.25 -///\file
    1.26 -///\brief Definition of INVALID.
    1.27 -
    1.28 -namespace lemon {
    1.29 -
    1.30 -  /// \brief Dummy type to make it easier to create invalid iterators.
    1.31 -  ///
    1.32 -  /// Dummy type to make it easier to create invalid iterators.
    1.33 -  /// See \ref INVALID for the usage.
    1.34 -  struct Invalid {
    1.35 -  public:
    1.36 -    bool operator==(Invalid) { return true;  }
    1.37 -    bool operator!=(Invalid) { return false; }
    1.38 -    bool operator< (Invalid) { return false; }
    1.39 -  };
    1.40 -
    1.41 -  /// \brief Invalid iterators.
    1.42 -  ///
    1.43 -  /// \ref Invalid is a global type that converts to each iterator
    1.44 -  /// in such a way that the value of the target iterator will be invalid.
    1.45 -
    1.46 -  //Some people didn't like this:
    1.47 -  //const Invalid &INVALID = *(Invalid *)0;
    1.48 -
    1.49 -#ifdef LEMON_ONLY_TEMPLATES
    1.50 -  const Invalid INVALID = Invalid();
    1.51 -#else
    1.52 -  extern const Invalid INVALID;
    1.53 -#endif
    1.54 -
    1.55 -} //namespace lemon
    1.56 -
    1.57 -#endif
    1.58 -