In C, an empty parameter list, (), means the function takes any arguments, and (void) means the function does not take any parameters.
In C++, an empty parameter list means the function does not take any parameters.
So, C++ still supports (void) parameter lists with the same semantics, why change to ()?
- removing the redundant
voidimproves signal-to-noise ratio of the code - using
(void)exposes a rare inconsistency in that a template taking a template(T)parameter list, cannot be instantiated withT=void