Boost C++ Libraries: Ticket #12036: boost::physical_concurrency always returns 0 if BOOST_USE_WINAPI_VERSION is not defined https://svn.boost.org/trac10/ticket/12036 <p> On Windows 7: Per default BOOST_USE_WINAPI_VERSION is not defined. Nevertheless, its value is compared to BOOST_WINAPI_VERSION_WINXP (see <a class="ext-link" href="https://github.com/boostorg/thread/blob/develop/src/win32/thread.cpp#L533"><span class="icon">​</span>link</a>). As a consequence, boost:physical_concurrency() always returns 0 and the test test_physical_concurrency_is_non_zero fails. </p> <p> It appears to me that BOOST_USE_WINAPI_VERSION should be already be defined <a class="ext-link" href="https://github.com/boostorg/thread/blob/develop/src/win32/thread.cpp#L533"><span class="icon">​</span>here</a> as it is used already in many other headers but somehow, it appears not to be. The proof is that applying the patch attached, the test passes. Maybe this is indicating some header inclusion issue. </p> <p> (This issue is present in the current "develop" branch, as well as in the 1.60 release) </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12036 Trac 1.4.3 Diego Barrios Romero <eldruin@…> Tue, 01 Mar 2016 16:56:22 GMT attachment set https://svn.boost.org/trac10/ticket/12036 https://svn.boost.org/trac10/ticket/12036 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost_thread_physical_concurrency_always_0.patch</span> </li> </ul> Ticket viboes Sat, 05 Mar 2016 10:09:18 GMT owner, status, milestone changed https://svn.boost.org/trac10/ticket/12036#comment:1 https://svn.boost.org/trac10/ticket/12036#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Anthony Williams</span> to <span class="trac-author">viboes</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.61.0</span> </li> </ul> <p> Hi, thanks for catching this issue. </p> <p> Please could you check on develop? </p> <p> <a class="ext-link" href="https://github.com/boostorg/thread/commit/317a735836fb77671d16df7e111fdbba22cc76a5"><span class="icon">​</span>https://github.com/boostorg/thread/commit/317a735836fb77671d16df7e111fdbba22cc76a5</a> </p> Ticket Diego Barrios Romero <eldruin@…> Mon, 07 Mar 2016 08:48:54 GMT <link>https://svn.boost.org/trac10/ticket/12036#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12036#comment:2</guid> <description> <p> Hi, your solution does solve the test. </p> <p> However, I still fear a header include problem. The variables BOOST_WINAPI_VERSION_WINXP, etc. are not defined either. These are defined in detail/winapi/config.hpp but this file does not appear to be included. Even if the user specified a winapi version via define, there would be no value to compare to. </p> <p> The proof is that the test passes if applying the patch <code>boost_thread_winapi_versions_not_defined.patch</code> attached. </p> </description> <category>Ticket</category> </item> <item> <author>Diego Barrios Romero <eldruin@…></author> <pubDate>Mon, 07 Mar 2016 08:49:15 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/12036 https://svn.boost.org/trac10/ticket/12036 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost_thread_winapi_versions_not_defined.patch</span> </li> </ul> Ticket viboes Tue, 08 Mar 2016 07:18:02 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/12036#comment:3 https://svn.boost.org/trac10/ticket/12036#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket