Make reverse() return type auto

This commit is contained in:
stefiosif
2022-07-13 23:04:59 +03:00
parent 31ba84dc2a
commit 227749b9e4

View File

@@ -16,7 +16,7 @@ public:
Digraph(std::map<T, std::set<T>> digraph);
// Reverse graph directions
Digraph<T> reverse();
auto reverse();
};
template<typename T>
@@ -27,7 +27,7 @@ Digraph<T>::Digraph(std::map<T, std::set<T>> digraph) {
}
template<typename T>
Digraph<T> Digraph<T>::reverse() {
auto Digraph<T>::reverse() {
std::map<T, std::set<T>> revMatrix;
for (const auto& v : Graph<T>::adjMatrix) {