Boost logo

Boost Users :

From: Douglas Gregor (doug.gregor_at_[hidden])
Date: 2007-06-30 11:01:58


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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net