The various getValue functions should not modify the underlying class,
so they have been turned into const. The only exception is ValueArg
where a non-const version is kept for backward compatibility (it
should be removed if we allow an API break). The other instances are
safe since the return value is not changed and the new function
signature is less restrictive.