Hello! I want to implement a visitor for the dijkstra_shortest_paths (...) algorithm. The visitor interface requires several methods which should be provided in each visitor object. But I need only one of these functions. So I considered to implement the others as empty functions like: void function(...) { } The problem now is, that as I apparently don't use the parameters, given to the function, inside of its body, the compiler prints out warnings about unused parameters. Is there a possibility to avoid this annoying thing? Except of disabling the warnings of the compiler in general. Regards Ewgenij -- Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kanns mit allen: http://www.gmx.net/de/go/multimessenger
On Sat, 2007-06-30 at 16:45 +0200, Ewgenij Sokolovski wrote:
Hello! I want to implement a visitor for the dijkstra_shortest_paths (...) algorithm. The visitor interface requires several methods which should be provided in each visitor object. But I need only one of these functions. So I considered to implement the others as empty functions like:
void function(...) {
}
The problem now is, that as I apparently don't use the parameters, given to the function, inside of its body, the compiler prints out warnings about unused parameters. Is there a possibility to avoid this annoying thing? Except of disabling the warnings of the compiler in general.
Don't give the parameters names, e.g., use void f(int) { } rather than void f(int param) { } - Doug
participants (2)
-
Douglas Gregor
-
Ewgenij Sokolovski