Changes to avoid "unreachable code" warnings

The "?" operator in the relevant line is now being implemented using "std::conditional" & "std::integral_type"