emucore.h: fix build error on VC++
This compiler requires exception classes to be copyable, because it copies the exception object as part of std::current_exception(). This means that code like the following has to work:
emu_fatalerror e1(...);
emu_fatalerror e2(e1);
However, it doesn't, because in this case the perfect-forwarding constructor is a better match than the copy constructor. So the compiler tries to instantiate the perfect-forwarding constructor with Format=emu_fatalerror &, which fails, since that's not a valid format string type.
To fix this, disable the perfect-forwarding constructor when Format is a subclass of emu_fatalerror.
Fixes #11316
Hi! I'm the co-author of #11853 who proposed to fix this by adding a copy constructor that takes by mutable reference.
I like the idea of your fix: The perfect-forwarding constructor should indeed never contain anything related to emu_fatalerror; it should contain formatting arguments. Your enable_if fixes the template constructor at the root, regardless of any overloads. You use heavier machinery (SFINAE instead of overload resolution), but your solution ends up more accurate semantically than my added overload.