Revert "If available, use constexpr if"

This reverts commit 503d4dd335.
This commit is contained in:
Juha Reunanen 2019-11-12 13:55:57 +02:00
parent 503d4dd335
commit d48b406a11
1 changed files with 1 additions and 5 deletions

View File

@ -867,11 +867,7 @@ namespace dlib
const auto convert_to_output_type = [](float value) const auto convert_to_output_type = [](float value)
{ {
if if (std::is_integral<T>::value)
#if __cplusplus >= 201703L || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L)
constexpr
#endif // __cplusplus >= 201703L
(std::is_integral<T>::value)
return static_cast<T>(value + 0.5); return static_cast<T>(value + 0.5);
else else
return static_cast<T>(value); return static_cast<T>(value);