Fixed a compilation bug under clang-cl (#5677)

* Fixed a compiltion bug under clang-cl

Oddly, this problem does not seem to manifest under clang on
gcc.godbolt.org.  I suspect that this might be related to the fact that
sizeof(std::size_t) != sizeof(long) on Windows.

* Couriersud feedback
This commit is contained in:
npwoods 2019-09-23 20:34:31 -04:00 committed by ajrhacker
parent b77f2851c9
commit 531633d519

View File

@ -142,7 +142,7 @@ namespace plib
if (ss >> x)
{
auto pos(ss.tellg());
if (pos == -1)
if (pos == static_cast<decltype(pos)>(-1))
pos = len;
*idx = static_cast<std::size_t>(pos);
}