Dirty hacking for VS 2005 in lp_base.h (#209)
authorJanos Tapolcai <tapolcai@tmit.bme.hu>
Fri, 23 Jan 2009 18:40:41 +0100
changeset 5142eb5c8ca2c91
parent 513 2a136de8e3f2
child 515 b9b3473327e3
Dirty hacking for VS 2005 in lp_base.h (#209)
lemon/lp_base.h
     1.1 --- a/lemon/lp_base.h	Fri Feb 13 16:05:21 2009 +0000
     1.2 +++ b/lemon/lp_base.h	Fri Jan 23 18:40:41 2009 +0100
     1.3 @@ -1383,26 +1383,26 @@
     1.4      template<class T>
     1.5      void colUpperBound(T &t, Value value) { return 0;}
     1.6  #else
     1.7 -    template<class T>
     1.8 -    typename enable_if<typename T::value_type::LpCol,void>::type
     1.9 -    colUpperBound(T &t, Value value,dummy<0> = 0) {
    1.10 -      for(typename T::iterator i=t.begin();i!=t.end();++i) {
    1.11 +    template<class T1>
    1.12 +    typename enable_if<typename T1::value_type::LpCol,void>::type
    1.13 +    colUpperBound(T1 &t, Value value,dummy<0> = 0) {
    1.14 +      for(typename T1::iterator i=t.begin();i!=t.end();++i) {
    1.15          colUpperBound(*i, value);
    1.16        }
    1.17      }
    1.18 -    template<class T>
    1.19 -    typename enable_if<typename T::value_type::second_type::LpCol,
    1.20 +    template<class T1>
    1.21 +    typename enable_if<typename T1::value_type::second_type::LpCol,
    1.22                         void>::type
    1.23 -    colUpperBound(T &t, Value value,dummy<1> = 1) {
    1.24 -      for(typename T::iterator i=t.begin();i!=t.end();++i) {
    1.25 +    colUpperBound(T1 &t, Value value,dummy<1> = 1) {
    1.26 +      for(typename T1::iterator i=t.begin();i!=t.end();++i) {
    1.27          colUpperBound(i->second, value);
    1.28        }
    1.29      }
    1.30 -    template<class T>
    1.31 -    typename enable_if<typename T::MapIt::Value::LpCol,
    1.32 +    template<class T1>
    1.33 +    typename enable_if<typename T1::MapIt::Value::LpCol,
    1.34                         void>::type
    1.35 -    colUpperBound(T &t, Value value,dummy<2> = 2) {
    1.36 -      for(typename T::MapIt i(t); i!=INVALID; ++i){
    1.37 +    colUpperBound(T1 &t, Value value,dummy<2> = 2) {
    1.38 +      for(typename T1::MapIt i(t); i!=INVALID; ++i){
    1.39          colUpperBound(*i, value);
    1.40        }
    1.41      }
    1.42 @@ -1432,24 +1432,24 @@
    1.43      template<class T>
    1.44      void colBounds(T &t, Value lower, Value upper) { return 0;}
    1.45  #else
    1.46 -    template<class T>
    1.47 -    typename enable_if<typename T::value_type::LpCol,void>::type
    1.48 -    colBounds(T &t, Value lower, Value upper,dummy<0> = 0) {
    1.49 -      for(typename T::iterator i=t.begin();i!=t.end();++i) {
    1.50 +    template<class T2>
    1.51 +    typename enable_if<typename T2::value_type::LpCol,void>::type
    1.52 +    colBounds(T2 &t, Value lower, Value upper,dummy<0> = 0) {
    1.53 +      for(typename T2::iterator i=t.begin();i!=t.end();++i) {
    1.54          colBounds(*i, lower, upper);
    1.55        }
    1.56      }
    1.57 -    template<class T>
    1.58 -    typename enable_if<typename T::value_type::second_type::LpCol, void>::type
    1.59 -    colBounds(T &t, Value lower, Value upper,dummy<1> = 1) {
    1.60 -      for(typename T::iterator i=t.begin();i!=t.end();++i) {
    1.61 +    template<class T2>
    1.62 +    typename enable_if<typename T2::value_type::second_type::LpCol, void>::type
    1.63 +    colBounds(T2 &t, Value lower, Value upper,dummy<1> = 1) {
    1.64 +      for(typename T2::iterator i=t.begin();i!=t.end();++i) {
    1.65          colBounds(i->second, lower, upper);
    1.66        }
    1.67      }
    1.68 -    template<class T>
    1.69 -    typename enable_if<typename T::MapIt::Value::LpCol, void>::type
    1.70 -    colBounds(T &t, Value lower, Value upper,dummy<2> = 2) {
    1.71 -      for(typename T::MapIt i(t); i!=INVALID; ++i){
    1.72 +    template<class T2>
    1.73 +    typename enable_if<typename T2::MapIt::Value::LpCol, void>::type
    1.74 +    colBounds(T2 &t, Value lower, Value upper,dummy<2> = 2) {
    1.75 +      for(typename T2::MapIt i(t); i!=INVALID; ++i){
    1.76          colBounds(*i, lower, upper);
    1.77        }
    1.78      }