[Lemon-commits] Alpar Juttner: Merge Intel C++ compatibility fix...
Lemon HG
hg at lemon.cs.elte.hu
Fri Jan 20 19:32:54 CET 2012
details: http://lemon.cs.elte.hu/hg/lemon/rev/be7dd3a8d6a3
changeset: 1127:be7dd3a8d6a3
user: Alpar Juttner <alpar [at] cs.elte.hu>
date: Fri Jan 20 19:20:02 2012 +0100
description:
Merge Intel C++ compatibility fixes to branch 1.2
diffstat:
CMakeLists.txt | 6 +++---
lemon/bfs.h | 1 +
lemon/concepts/graph_components.h | 20 ++++++++++++++++++++
lemon/concepts/heap.h | 1 +
lemon/concepts/maps.h | 12 +++++++++---
lemon/concepts/path.h | 2 ++
lemon/dfs.h | 1 +
7 files changed, 37 insertions(+), 6 deletions(-)
diffs (293 lines):
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -66,17 +66,17 @@
# (performance warning)
# C4996: 'function': was declared deprecated
ELSE()
- SET(CXX_WARNING "-Wall -W")
+ SET(CXX_WARNING "-Wall")
ENDIF()
ENDIF()
SET(LEMON_CXX_WARNING_FLAGS ${CXX_WARNING} CACHE STRING "LEMON warning flags.")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LEMON_CXX_WARNING_FLAGS}")
-SET( CMAKE_CXX_FLAGS_MAINTAINER "-Werror -ggdb" CACHE STRING
+SET( CMAKE_CXX_FLAGS_MAINTAINER "-Werror -ggdb -O0" CACHE STRING
"Flags used by the C++ compiler during maintainer builds."
FORCE )
-SET( CMAKE_C_FLAGS_MAINTAINER "-Werror" CACHE STRING
+SET( CMAKE_C_FLAGS_MAINTAINER "-Werror -O0" CACHE STRING
"Flags used by the C compiler during maintainer builds."
FORCE )
SET( CMAKE_EXE_LINKER_FLAGS_MAINTAINER
diff --git a/lemon/bfs.h b/lemon/bfs.h
--- a/lemon/bfs.h
+++ b/lemon/bfs.h
@@ -1251,6 +1251,7 @@
visitor.examine(arc);
}
_Visitor& visitor;
+ Constraints() {}
};
};
#endif
diff --git a/lemon/concepts/graph_components.h b/lemon/concepts/graph_components.h
--- a/lemon/concepts/graph_components.h
+++ b/lemon/concepts/graph_components.h
@@ -115,6 +115,7 @@
const _GraphItem &ia;
const _GraphItem &ib;
+ Constraints() {}
};
};
@@ -174,6 +175,7 @@
}
const _Digraph& digraph;
+ Constraints() {}
};
};
@@ -290,6 +292,7 @@
}
const _Graph& graph;
+ Constraints() {}
};
};
@@ -369,6 +372,7 @@
}
const _Digraph& digraph;
+ Constraints() {}
};
};
@@ -421,6 +425,7 @@
}
const _Graph& graph;
+ Constraints() {}
};
};
@@ -498,6 +503,7 @@
bi = it2;
}
const GR& g;
+ Constraints() {}
};
};
@@ -586,6 +592,7 @@
}
const Base& node;
const GR& graph;
+ Constraints() {}
};
};
@@ -762,6 +769,7 @@
}
const _Digraph& digraph;
+ Constraints() {}
};
};
@@ -886,6 +894,7 @@
}
const _Graph& graph;
+ Constraints() {}
};
};
@@ -943,6 +952,7 @@
}
const _Digraph& digraph;
+ Constraints() {}
};
};
@@ -984,6 +994,7 @@
}
const _Graph& graph;
+ Constraints() {}
};
};
@@ -1061,6 +1072,7 @@
const _Map &m;
const GR &g;
const typename GraphMap::Value &t;
+ Constraints() {}
};
};
@@ -1199,6 +1211,7 @@
}
const _Digraph& digraph;
+ Constraints() {}
};
};
@@ -1284,6 +1297,7 @@
}
const _Graph& graph;
+ Constraints() {}
};
};
@@ -1328,6 +1342,7 @@
}
_Digraph& digraph;
+ Constraints() {}
};
};
@@ -1372,6 +1387,7 @@
}
_Graph& graph;
+ Constraints() {}
};
};
@@ -1411,6 +1427,7 @@
}
_Digraph& digraph;
+ Constraints() {}
};
};
@@ -1450,6 +1467,7 @@
}
_Graph& graph;
+ Constraints() {}
};
};
@@ -1478,6 +1496,7 @@
}
_Digraph& digraph;
+ Constraints() {}
};
};
@@ -1506,6 +1525,7 @@
}
_Graph& graph;
+ Constraints() {}
};
};
diff --git a/lemon/concepts/heap.h b/lemon/concepts/heap.h
--- a/lemon/concepts/heap.h
+++ b/lemon/concepts/heap.h
@@ -314,6 +314,7 @@
_Heap& heap;
ItemIntMap& map;
+ Constraints() {}
};
};
diff --git a/lemon/concepts/maps.h b/lemon/concepts/maps.h
--- a/lemon/concepts/maps.h
+++ b/lemon/concepts/maps.h
@@ -68,6 +68,7 @@
const Key& key;
const typename _ReadMap::Key& own_key;
const _ReadMap& m;
+ Constraints() {}
};
};
@@ -109,6 +110,7 @@
const typename _WriteMap::Key& own_key;
const typename _WriteMap::Value& own_val;
_WriteMap& m;
+ Constraints() {}
};
};
@@ -129,7 +131,8 @@
/// Returns the value associated with the given key.
Value operator[](const Key &) const {
- return *static_cast<Value *>(0);
+ Value *r = 0;
+ return *r;
}
/// Sets the value associated with the given key.
@@ -169,12 +172,14 @@
/// Returns a reference to the value associated with the given key.
Reference operator[](const Key &) {
- return *static_cast<Value *>(0);
+ Value *r = 0;
+ return *r;
}
/// Returns a const reference to the value associated with the given key.
ConstReference operator[](const Key &) const {
- return *static_cast<Value *>(0);
+ Value *r = 0;
+ return *r;
}
/// Sets the value associated with the given key.
@@ -205,6 +210,7 @@
typename _ReferenceMap::Reference own_ref;
typename _ReferenceMap::ConstReference own_cref;
_ReferenceMap& m;
+ Constraints() {}
};
};
diff --git a/lemon/concepts/path.h b/lemon/concepts/path.h
--- a/lemon/concepts/path.h
+++ b/lemon/concepts/path.h
@@ -168,6 +168,7 @@
ignore_unused_variable_warning(ed);
}
_Path& p;
+ PathDumperConstraints() {}
};
template <typename _Digraph, typename _Path>
@@ -193,6 +194,7 @@
ignore_unused_variable_warning(ed);
}
_Path& p;
+ PathDumperConstraints() {}
};
}
diff --git a/lemon/dfs.h b/lemon/dfs.h
--- a/lemon/dfs.h
+++ b/lemon/dfs.h
@@ -1193,6 +1193,7 @@
visitor.backtrack(arc);
}
_Visitor& visitor;
+ Constraints() {}
};
};
#endif
More information about the Lemon-commits
mailing list