Clarify INVALID implementation.
authoralpar
Tue, 29 Nov 2005 08:43:50 +0000
changeset 18361fee7c6b5129
parent 1835 eb6c34c76501
child 1837 8dd6160ff699
Clarify INVALID implementation.
lemon/base.cc
lemon/invalid.h
     1.1 --- a/lemon/base.cc	Tue Nov 29 08:40:03 2005 +0000
     1.2 +++ b/lemon/base.cc	Tue Nov 29 08:43:50 2005 +0000
     1.3 @@ -24,4 +24,6 @@
     1.4    double Tolerance<double>::def_epsilon = 1e-10;
     1.5    float Tolerance<float>::def_epsilon = 1e-4;
     1.6  
     1.7 +  const Invalid INVALID = Invalid();
     1.8 +
     1.9  } //namespace lemon
     2.1 --- a/lemon/invalid.h	Tue Nov 29 08:40:03 2005 +0000
     2.2 +++ b/lemon/invalid.h	Tue Nov 29 08:43:50 2005 +0000
     2.3 @@ -38,13 +38,13 @@
     2.4    /// \ref Invalid is a global type that converts to each iterator
     2.5    /// in such a way that the value of the target iterator will be invalid.
     2.6  
     2.7 -  // It is also used to convert the \c INVALID constant to the
     2.8 -  // node iterator that makes is possible to write 
     2.9 +  //const Invalid &INVALID = *(Invalid *)0;
    2.10  
    2.11 -  //extern Invalid INVALID;
    2.12 -
    2.13 -  //const Invalid &INVALID = *(Invalid *)0;
    2.14 +#ifdef LEMON_ONLY_TEMPLATES
    2.15    const Invalid INVALID = Invalid();
    2.16 +#else
    2.17 +  extern const Invalid INVALID;
    2.18 +#endif
    2.19  
    2.20  } //namespace lemon
    2.21