Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix after finally discovering what to do to NOT need the
set_value2
…
… naming hack: the Param::set_value methods will not be considered by the compiler here, resulting in at least 1 compile error in params.cpp, due to this nasty little blurb: > Member lookup rules are defined in Section 10.2/2 > > The following steps define the result of name lookup in a class scope, C. > First, every declaration for the name in the class and in each of its base class sub-objects is considered. A member name f > in one sub-object B hides a member name f in a sub-object A if A is a base class sub-object of B. Any declarations that are > so hidden are eliminated from consideration. <-- !!! > Each of these declarations that was introduced by a using-declaration is considered to be from each sub-object of C that is > of the type containing the declara-tion designated by the using-declaration. If the resulting set of declarations are not > all from sub-objects of the same type, or the set has a nonstatic member and includes members from distinct sub-objects, > there is an ambiguity and the program is ill-formed. Otherwise that set is the result of the lookup. Found here: https://stackoverflow.com/questions/5368862/why-do-multiple-inherited-functions-with-same-name-but-different-signatures-not which seems to be off-topic due to the mutiple-inheritance issues discussed there, but the phrasing of that little C++ standards blurb is such that it applies to our situation as well, where we only replace/override a *subset* of the available set_value() methods from the Params class. Half a year later and I stumble across that little paragraph; would never have thought to apply a `using` statement here, but it works! !@#$%^&* C++! Incidentally, the fruity thing about it all is that it only errors out for StringParam in params.cpp, while a sane individual would've reckoned it'd bother all four of them: IntParam, FloatParam, etc.
- Loading branch information