Compilation with G++ -ansi
authordeba
Tue, 07 Feb 2006 09:20:47 +0000
changeset 196571b3bc042c47
parent 1964 df0b07457083
child 1966 65765fb5eb2f
Compilation with G++ -ansi
lemon/bits/default_map.h
lemon/tolerance.h
     1.1 --- a/lemon/bits/default_map.h	Mon Feb 06 20:32:29 2006 +0000
     1.2 +++ b/lemon/bits/default_map.h	Tue Feb 07 09:20:47 2006 +0000
     1.3 @@ -33,7 +33,7 @@
     1.4  
     1.5    template <typename _Graph, typename _Item, typename _Value>
     1.6    struct DefaultMapSelector {
     1.7 -    typedef ArrayMap<_Graph, _Item, _Value> Map;
     1.8 +    typedef VectorMap<_Graph, _Item, _Value> Map;
     1.9    };
    1.10  
    1.11    // bool
    1.12 @@ -94,7 +94,21 @@
    1.13      typedef VectorMap<_Graph, _Item, unsigned long> Map;
    1.14    };
    1.15  
    1.16 -  // \todo handling long long type
    1.17 +
    1.18 +#ifndef __STRICT_ANSI__
    1.19 +
    1.20 +  // long long
    1.21 +  template <typename _Graph, typename _Item>
    1.22 +  struct DefaultMapSelector<_Graph, _Item, signed long long> {
    1.23 +    typedef VectorMap<_Graph, _Item, signed long long> Map;
    1.24 +  };
    1.25 +
    1.26 +  template <typename _Graph, typename _Item>
    1.27 +  struct DefaultMapSelector<_Graph, _Item, unsigned long long> {
    1.28 +    typedef VectorMap<_Graph, _Item, unsigned long long> Map;
    1.29 +  };
    1.30 +
    1.31 +#endif
    1.32  
    1.33  
    1.34    // float
     2.1 --- a/lemon/tolerance.h	Mon Feb 06 20:32:29 2006 +0000
     2.2 +++ b/lemon/tolerance.h	Tue Feb 07 09:20:47 2006 +0000
     2.3 @@ -271,9 +271,12 @@
     2.4      static Value zero() {return 0;}
     2.5    };
     2.6  
     2.7 +#ifndef __STRICT_ANSI__
     2.8 +
     2.9    ///Long long integer specialization of \ref Tolerance.
    2.10  
    2.11    ///Long long integer specialization of \ref Tolerance.
    2.12 +  ///\warning This class is not ansi compatible.
    2.13    ///\sa Tolerance
    2.14    template<>
    2.15    class Tolerance<long long int>
    2.16 @@ -304,6 +307,8 @@
    2.17      static Value zero() {return 0;}
    2.18    };
    2.19  
    2.20 +#endif
    2.21 +
    2.22    /// @}
    2.23  
    2.24  } //namespace lemon