I have v1 and v2 versions of my software. v1 uses the registry to save settings, with lots of calls to GetProfileInt, etc. v2 now uses an sqlite db to save settings.
<
If you're free to turn the function into a template, you can do something like this:
template
struct always_false { static constexpr bool value = false; };
template
void never_call_me(Ts&&...)
{
static_assert(always_false::value,
"You should have never called this function!");
}
This has the advantage that the compile error will be clean + you can provide an error message. Found here, see that answer for more info on why this works + why always_false
is needed.