Since C++11, std::sqrt() is required to have an integral overload. See https://en.cppreference.com/w/cpp/numeric/math/sqrt

Looking at https://github.com/google/sentencepiece/issues/432#issuecomment-639434698, it seems this is a known defect of Solaris world

Using 5.0 should be a no-brainer and portable fix.

Le 22/06/2022 à 00:22, Greg Troxel a écrit :
Paul Ramsey <pram...@cleverelephant.ca> writes:

Well, it's super rare, platformwise so I don't really categorize it as
"our problem", but it's nice to be clearer. What's the simplest way to
I said smartos but this is almost certainly most if not all solaris.

even find out if a change fixes this? I'm tempted to make everything
std::sqrt() on some kind of principle, but I have no idea if that will
actually change anything. Probably just changing the 5 to 5.0 would do
the trick.
With a candidate change, I can apply it and see what happens.   I don't
know the C++ rules well enough to pick something that is correct by
spec.

If your preferred approach is changing to 5.0 (which I presume is a
double constant since it is not 5.0f), then I can try that.

_______________________________________________
geos-devel mailing list
geos-devel@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/geos-devel

--
http://www.spatialys.com
My software is free, but my time generally not.

_______________________________________________
geos-devel mailing list
geos-devel@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/geos-devel

Reply via email to