Change constexpr function pointers to static constants

Note: Newer version of gcc no longer supports constexpr
function pointers to be declared in the header file.
Therefore we fixed this by declaring them as static
constants in the header file and moved the initialization
to the source file.

Change-Id: Ied87c62b14be79cc268cfe8c63e8f2385c7e75b6
Signed-off-by: Saqib Khan <khansa@us.ibm.com>
diff --git a/mainloop.cpp b/mainloop.cpp
index b639539..399b17e 100644
--- a/mainloop.cpp
+++ b/mainloop.cpp
@@ -25,6 +25,35 @@
 #include "env.hpp"
 #include "thresholds.hpp"
 
+// Initialization for Warning Objects
+decltype(Thresholds<WarningObject>::setLo) Thresholds<WarningObject>::setLo =
+    &WarningObject::warningLow;
+decltype(Thresholds<WarningObject>::setHi) Thresholds<WarningObject>::setHi =
+    &WarningObject::warningHigh;
+decltype(Thresholds<WarningObject>::getLo) Thresholds<WarningObject>::getLo =
+    &WarningObject::warningLow;
+decltype(Thresholds<WarningObject>::getHi) Thresholds<WarningObject>::getHi =
+    &WarningObject::warningHigh;
+decltype(Thresholds<WarningObject>::alarmLo) Thresholds<WarningObject>::alarmLo =
+    &WarningObject::warningAlarmLow;
+decltype(Thresholds<WarningObject>::alarmHi) Thresholds<WarningObject>::alarmHi =
+    &WarningObject::warningAlarmHigh;
+
+// Initialization for Critical Objects
+decltype(Thresholds<CriticalObject>::setLo) Thresholds<CriticalObject>::setLo =
+    &CriticalObject::criticalLow;
+decltype(Thresholds<CriticalObject>::setHi) Thresholds<CriticalObject>::setHi =
+    &CriticalObject::criticalHigh;
+decltype(Thresholds<CriticalObject>::getLo) Thresholds<CriticalObject>::getLo =
+    &CriticalObject::criticalLow;
+decltype(Thresholds<CriticalObject>::getHi) Thresholds<CriticalObject>::getHi =
+    &CriticalObject::criticalHigh;
+decltype(Thresholds<CriticalObject>::alarmLo) Thresholds<CriticalObject>::alarmLo =
+    &CriticalObject::criticalAlarmLow;
+decltype(Thresholds<CriticalObject>::alarmHi) Thresholds<CriticalObject>::alarmHi =
+    &CriticalObject::criticalAlarmHigh;
+
+
 using namespace std::literals::chrono_literals;
 
 static constexpr auto typeAttrMap =