79463524

Date: 2025-02-24 12:35:26
Score: 0.5
Natty:
Report link

Final solution was removing catch all template:

template <EventId_e EventId, typename... Args>
static void Log(Args... args) {
  LogMessage(static_cast<Args>(args)...);
}

And using this type of template for every ID:

template <EventId_e EventId, typename std::enable_if<EventId == EventId_e::EventId_OverVoltageWarning, int>::type = 0>  void Log(uint16_t MaxCellVoltage, uint16_t MinCellVoltage, int16_t PeakCurrent) { LogMessage(MaxCellVoltage, MinCellVoltage, PeakCurrent); }
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Sarge324