Fixed compilation issues for GCC on Linux.
This commit is contained in:
1 parent
b03b04bfcd
commit
c366f4415d
4 files changed
+207
-265
No files matched your search
@@ -118,7 +118,6 @@ inline T narrow(U u)
|
||||
{
|
||||
T t = narrow_cast<T>(u);
|
||||
if (static_cast<U>(t) != u) throw narrowing_error();
|
||||
#pragma warning(suppress : 4127) // suppress warning from MSVC compiler about constant in if-test
|
||||
if (!details::is_same_signedness<T, U>::value && ((t < T{}) != (u < U{})))
|
||||
throw narrowing_error();
|
||||
return t;
|
||||
|
||||
Reference in new issue
Block a user