Minor adjustment to the commit for MLCE-1165

  * Rewrote constexpr check to avoid a compile error

Signed-off-by: Tracy Narine <tracy.narine@arm.com>
Change-Id: I09a61314b1b4a5aa1e2baa52711f470802f04131
diff --git a/src/armnn/optimizations/FoldPadIntoLayer2d.hpp b/src/armnn/optimizations/FoldPadIntoLayer2d.hpp
index 5592491..e88e498 100644
--- a/src/armnn/optimizations/FoldPadIntoLayer2d.hpp
+++ b/src/armnn/optimizations/FoldPadIntoLayer2d.hpp
@@ -157,7 +157,7 @@
     // Workaround an issue in the compute library. The conv2d algorithm that the
     // compute library is choosing is not handling the 1x1 filter case when
     // the padding size >= filter size
-    if constexpr (std::is_same<Layer2dT, armnn::Convolution2dLayer>::value)
+    if (layer2d.GetType() == armnn::LayerType::Convolution2d)
     {
         // Get filter width and height
         armnnUtils::DataLayoutIndexed dataLayoutIndex(newLayer2dDescriptor.m_DataLayout);