mtholder / ncl

Nexus Class Library
GNU General Public License v2.0
8 stars 16 forks source link

cast return from NxsStringVector::size() to unsigned #21

Closed mbrazeau closed 3 years ago

mbrazeau commented 3 years ago

Proposed fix for: https://github.com/mtholder/ncl/issues/5#issue-50547735

I keep running into the same problem ("ambiguous overload for 'operator<<'") trying to build on Windows with latest Visual Studio. The suggested fix in the issues page was explicit cast to long unsigned int, but I noticed the returns from NxsStringVector::size() are always cast to unsigned elsewhere in the same file (line 304 is nearly identical and has already been cast). I suppose this was just an accidental omission that never got caught as other compilers don't seem to be bothered by this overload.

mbrazeau commented 3 years ago

I made a stupid and put the cast on the wrong side of the operator! (duh!) Will make new PR. Apologies.