fmt_unveil<> fix

This commit is contained in:
Nekotekina 2016-08-07 16:59:46 +03:00
parent 4438163da1
commit 1a7ea2d235
8 changed files with 29 additions and 17 deletions

View file

@ -314,14 +314,8 @@ namespace cfg
if (try_to_enum_value(&result, &fmt_class_string<T>::format, value))
{
const auto val = static_cast<std::underlying_type_t<T>>(result);
if (static_cast<u64>(val) != result)
{
return false;
}
m_value = static_cast<T>(val);
// No narrowing check, it's hard to do right there
m_value = static_cast<T>(static_cast<std::underlying_type_t<T>>(result));
return true;
}