id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 6959,call of abs is ambiguous,Niklas Angare ,viboes,"The regression tests this_thread!__sleep_for_p* and this_thread!__sleep_until_p* fail to compile on QNX 6.5.0: {{{ sleep_for_pass.cpp:38: error: call of overloaded 'abs(long int)' is ambiguous }}} Here's the troublesome line: {{{ BOOST_TEST(std::abs(static_cast(ns.count())) < (err+boost::chrono::milliseconds(1000)).count()); }}} I'm thinking that it might be a compiler bug but either way it should be easy to work around. I guess the static_cast is a work-around for the fact that C++03 doesn't have abs(long long). I'm attaching a patch with a more reliable solution, with no risk of 32-bit overflow: {{{ BOOST_TEST(std::max(ns, -ns) < (err+boost::chrono::milliseconds(1000))); }}} These also work but have the overflow problem: {{{ BOOST_TEST(std::abs(static_cast(ns.count())) < (err+boost::chrono::milliseconds(1000)).count()); }}} {{{ BOOST_TEST(std::labs(static_cast(ns.count())) < (err+boost::chrono::milliseconds(1000)).count()); }}} As a side note; one of the tests end with ''return boost::report_errors()'' while the other one doesn't. Bug?",Patches,closed,Boost 1.50.0,thread,Boost 1.50.0,Problem,fixed,,vicente.botet@…