Date: Sat, 07 May 2016 22:15:47 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 209369] chinese/sunpinyin: Fix build with libc++ 3.8.0 Message-ID: <bug-209369-13-7gBfISiENz@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-209369-13@https.bugs.freebsd.org/bugzilla/> References: <bug-209369-13@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D209369 --- Comment #3 from Dimitry Andric <dim@FreeBSD.org> --- (In reply to lichray from comment #2) > Forgot to mention, declare >=20 > #include <cmath> >=20 > using std::log; > using std::exp; >=20 > Will be an alternative fix, because C++ overloaded them. Hm, I've tried this, but it still fails. Possibly because of the macro usag= es like the following: 364 std::map<float, int>::iterator prit =3D pr_map.find(pn-= >pr); 365 if (prit =3D=3D pr_map.end()) { // This would be cause = by precision error 366 double val =3D EffectivePr(pn->pr); 367 val =3D OriginalPr(val); 368 prit =3D pr_map.find(val); 369 assert(prit !=3D pr_map.end()); 370 } Because OriginalPr() is called with a double argument, the double versions = of log() and exp2() are chosen. Maybe it would be better to define the macros= as inline functions. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-209369-13-7gBfISiENz>