Intel C++ compatibility fixes
authorAlpar Juttner <alpar@cs.elte.hu>
Thu, 19 Jan 2012 15:25:06 +0100
changeset 1125b873350e6258
parent 1120 ee581a0ecfbf
child 1126 a30455cd0107
child 1127 be7dd3a8d6a3
child 1128 426a704d7483
child 1140 8d281761dea4
Intel C++ compatibility fixes
CMakeLists.txt
lemon/bfs.h
lemon/concepts/graph_components.h
lemon/concepts/heap.h
lemon/concepts/maps.h
lemon/concepts/path.h
lemon/dfs.h
     1.1 --- a/CMakeLists.txt	Fri Jan 06 16:27:06 2012 +0100
     1.2 +++ b/CMakeLists.txt	Thu Jan 19 15:25:06 2012 +0100
     1.3 @@ -66,17 +66,17 @@
     1.4      #        (performance warning)
     1.5      # C4996: 'function': was declared deprecated
     1.6    ELSE()
     1.7 -    SET(CXX_WARNING "-Wall -W")
     1.8 +    SET(CXX_WARNING "-Wall")
     1.9    ENDIF()
    1.10  ENDIF()
    1.11  SET(LEMON_CXX_WARNING_FLAGS ${CXX_WARNING} CACHE STRING "LEMON warning flags.")
    1.12  
    1.13  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LEMON_CXX_WARNING_FLAGS}")
    1.14  
    1.15 -SET( CMAKE_CXX_FLAGS_MAINTAINER "-Werror -ggdb" CACHE STRING
    1.16 +SET( CMAKE_CXX_FLAGS_MAINTAINER "-Werror -ggdb -O0" CACHE STRING
    1.17      "Flags used by the C++ compiler during maintainer builds."
    1.18      FORCE )
    1.19 -SET( CMAKE_C_FLAGS_MAINTAINER "-Werror" CACHE STRING
    1.20 +SET( CMAKE_C_FLAGS_MAINTAINER "-Werror -O0" CACHE STRING
    1.21      "Flags used by the C compiler during maintainer builds."
    1.22      FORCE )
    1.23  SET( CMAKE_EXE_LINKER_FLAGS_MAINTAINER
     2.1 --- a/lemon/bfs.h	Fri Jan 06 16:27:06 2012 +0100
     2.2 +++ b/lemon/bfs.h	Thu Jan 19 15:25:06 2012 +0100
     2.3 @@ -1247,6 +1247,7 @@
     2.4          visitor.examine(arc);
     2.5        }
     2.6        _Visitor& visitor;
     2.7 +      Constraints() {}
     2.8      };
     2.9    };
    2.10  #endif
     3.1 --- a/lemon/concepts/graph_components.h	Fri Jan 06 16:27:06 2012 +0100
     3.2 +++ b/lemon/concepts/graph_components.h	Thu Jan 19 15:25:06 2012 +0100
     3.3 @@ -115,6 +115,7 @@
     3.4  
     3.5          const _GraphItem &ia;
     3.6          const _GraphItem &ib;
     3.7 +        Constraints() {}
     3.8        };
     3.9      };
    3.10  
    3.11 @@ -174,6 +175,7 @@
    3.12          }
    3.13  
    3.14          const _Digraph& digraph;
    3.15 +        Constraints() {}
    3.16        };
    3.17      };
    3.18  
    3.19 @@ -290,6 +292,7 @@
    3.20          }
    3.21  
    3.22          const _Graph& graph;
    3.23 +      Constraints() {}
    3.24        };
    3.25  
    3.26      };
    3.27 @@ -369,6 +372,7 @@
    3.28          }
    3.29  
    3.30          const _Digraph& digraph;
    3.31 +        Constraints() {}
    3.32        };
    3.33      };
    3.34  
    3.35 @@ -421,6 +425,7 @@
    3.36          }
    3.37  
    3.38          const _Graph& graph;
    3.39 +        Constraints() {}
    3.40        };
    3.41      };
    3.42  
    3.43 @@ -498,6 +503,7 @@
    3.44            bi = it2;
    3.45          }
    3.46          const GR& g;
    3.47 +        Constraints() {}
    3.48        };
    3.49      };
    3.50  
    3.51 @@ -586,6 +592,7 @@
    3.52          }
    3.53          const Base& node;
    3.54          const GR& graph;
    3.55 +        Constraints() {}
    3.56        };
    3.57      };
    3.58  
    3.59 @@ -762,6 +769,7 @@
    3.60          }
    3.61  
    3.62          const _Digraph& digraph;
    3.63 +        Constraints() {}
    3.64        };
    3.65      };
    3.66  
    3.67 @@ -886,6 +894,7 @@
    3.68          }
    3.69  
    3.70          const _Graph& graph;
    3.71 +        Constraints() {}
    3.72        };
    3.73      };
    3.74  
    3.75 @@ -943,6 +952,7 @@
    3.76          }
    3.77  
    3.78          const _Digraph& digraph;
    3.79 +        Constraints() {}
    3.80        };
    3.81      };
    3.82  
    3.83 @@ -984,6 +994,7 @@
    3.84          }
    3.85  
    3.86          const _Graph& graph;
    3.87 +        Constraints() {}
    3.88        };
    3.89      };
    3.90  
    3.91 @@ -1061,6 +1072,7 @@
    3.92          const _Map &m;
    3.93          const GR &g;
    3.94          const typename GraphMap::Value &t;
    3.95 +        Constraints() {}
    3.96        };
    3.97  
    3.98      };
    3.99 @@ -1199,6 +1211,7 @@
   3.100          }
   3.101  
   3.102          const _Digraph& digraph;
   3.103 +        Constraints() {}
   3.104        };
   3.105      };
   3.106  
   3.107 @@ -1284,6 +1297,7 @@
   3.108          }
   3.109  
   3.110          const _Graph& graph;
   3.111 +        Constraints() {}
   3.112        };
   3.113      };
   3.114  
   3.115 @@ -1328,6 +1342,7 @@
   3.116          }
   3.117  
   3.118          _Digraph& digraph;
   3.119 +        Constraints() {}
   3.120        };
   3.121      };
   3.122  
   3.123 @@ -1372,6 +1387,7 @@
   3.124          }
   3.125  
   3.126          _Graph& graph;
   3.127 +        Constraints() {}
   3.128        };
   3.129      };
   3.130  
   3.131 @@ -1411,6 +1427,7 @@
   3.132          }
   3.133  
   3.134          _Digraph& digraph;
   3.135 +        Constraints() {}
   3.136        };
   3.137      };
   3.138  
   3.139 @@ -1450,6 +1467,7 @@
   3.140          }
   3.141  
   3.142          _Graph& graph;
   3.143 +        Constraints() {}
   3.144        };
   3.145      };
   3.146  
   3.147 @@ -1478,6 +1496,7 @@
   3.148          }
   3.149  
   3.150          _Digraph& digraph;
   3.151 +        Constraints() {}
   3.152        };
   3.153      };
   3.154  
   3.155 @@ -1506,6 +1525,7 @@
   3.156          }
   3.157  
   3.158          _Graph& graph;
   3.159 +        Constraints() {}
   3.160        };
   3.161      };
   3.162  
     4.1 --- a/lemon/concepts/heap.h	Fri Jan 06 16:27:06 2012 +0100
     4.2 +++ b/lemon/concepts/heap.h	Thu Jan 19 15:25:06 2012 +0100
     4.3 @@ -252,6 +252,7 @@
     4.4  
     4.5          _Heap& heap;
     4.6          ItemIntMap& map;
     4.7 +        Constraints() {}
     4.8        };
     4.9      };
    4.10  
     5.1 --- a/lemon/concepts/maps.h	Fri Jan 06 16:27:06 2012 +0100
     5.2 +++ b/lemon/concepts/maps.h	Thu Jan 19 15:25:06 2012 +0100
     5.3 @@ -68,6 +68,7 @@
     5.4          const Key& key;
     5.5          const typename _ReadMap::Key& own_key;
     5.6          const _ReadMap& m;
     5.7 +        Constraints() {}
     5.8        };
     5.9  
    5.10      };
    5.11 @@ -109,6 +110,7 @@
    5.12          const typename _WriteMap::Key& own_key;
    5.13          const typename _WriteMap::Value& own_val;
    5.14          _WriteMap& m;
    5.15 +        Constraints() {}
    5.16        };
    5.17      };
    5.18  
    5.19 @@ -129,7 +131,8 @@
    5.20  
    5.21        /// Returns the value associated with the given key.
    5.22        Value operator[](const Key &) const {
    5.23 -        return *static_cast<Value *>(0);
    5.24 +        Value *r = 0;
    5.25 +        return *r;
    5.26        }
    5.27  
    5.28        /// Sets the value associated with the given key.
    5.29 @@ -169,12 +172,14 @@
    5.30  
    5.31        /// Returns a reference to the value associated with the given key.
    5.32        Reference operator[](const Key &) {
    5.33 -        return *static_cast<Value *>(0);
    5.34 +        Value *r = 0;
    5.35 +        return *r;
    5.36        }
    5.37  
    5.38        /// Returns a const reference to the value associated with the given key.
    5.39        ConstReference operator[](const Key &) const {
    5.40 -        return *static_cast<Value *>(0);
    5.41 +        Value *r = 0;
    5.42 +        return *r;
    5.43        }
    5.44  
    5.45        /// Sets the value associated with the given key.
    5.46 @@ -205,6 +210,7 @@
    5.47          typename _ReferenceMap::Reference own_ref;
    5.48          typename _ReferenceMap::ConstReference own_cref;
    5.49          _ReferenceMap& m;
    5.50 +        Constraints() {}
    5.51        };
    5.52      };
    5.53  
     6.1 --- a/lemon/concepts/path.h	Fri Jan 06 16:27:06 2012 +0100
     6.2 +++ b/lemon/concepts/path.h	Thu Jan 19 15:25:06 2012 +0100
     6.3 @@ -159,6 +159,7 @@
     6.4            ignore_unused_variable_warning(ed);
     6.5          }
     6.6          _Path& p;
     6.7 +        PathDumperConstraints() {}
     6.8        };
     6.9  
    6.10        template <typename _Digraph, typename _Path>
    6.11 @@ -184,6 +185,7 @@
    6.12            ignore_unused_variable_warning(ed);
    6.13          }
    6.14          _Path& p;
    6.15 +        PathDumperConstraints() {}
    6.16        };
    6.17  
    6.18      }
     7.1 --- a/lemon/dfs.h	Fri Jan 06 16:27:06 2012 +0100
     7.2 +++ b/lemon/dfs.h	Thu Jan 19 15:25:06 2012 +0100
     7.3 @@ -1191,6 +1191,7 @@
     7.4          visitor.backtrack(arc);
     7.5        }
     7.6        _Visitor& visitor;
     7.7 +      Constraints() {}
     7.8      };
     7.9    };
    7.10  #endif