Boost C++ Libraries: Ticket #4638: Compile error using boost::asio::has_service() https://svn.boost.org/trac10/ticket/4638 <p> Using the template function <strong>boost::asio::has_service()</strong> leads to compiler error "const ... discards qualifiers" with gcc 4.2.1 and MSVS 2008. </p> <p> <strong>Problem:</strong> </p> <p> has_service() is defined as const, but calls non const members init_key() </p> <p> <strong>Possible solution:</strong> </p> <p> make init_key() a const member. <strong> Files affected:</strong> </p> <p> boost/asio/detail/service_registry.hpp boost/asio/detail/impl/service_registry.hpp boost/asio/detail/impl/service_registry.ipp </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4638 Trac 1.4.3 chris_kohlhoff Sat, 16 Oct 2010 06:21:34 GMT severity changed https://svn.boost.org/trac10/ticket/4638#comment:1 https://svn.boost.org/trac10/ticket/4638#comment:1 <ul> <li><strong>severity</strong> <span class="trac-field-old">Showstopper</span> → <span class="trac-field-new">Problem</span> </li> </ul> Ticket chris_kohlhoff Sat, 16 Oct 2010 06:28:02 GMT <link>https://svn.boost.org/trac10/ticket/4638#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4638#comment:2</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/66005" title="Fix a const-correctness issue that prevents valid uses of ...">[66005]</a>) Fix a const-correctness issue that prevents valid uses of has_service&lt;&gt; from compiling. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4638" title="#4638: Bugs: Compile error using boost::asio::has_service() (closed: fixed)">#4638</a>. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>chris_kohlhoff</dc:creator> <pubDate>Sun, 17 Oct 2010 12:25:02 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/4638#comment:3 https://svn.boost.org/trac10/ticket/4638#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/66037" title="Merge from trunk. ........ r65998 | chris_kohlhoff | 2010-10-16 ...">[66037]</a>) Merge from trunk. </p> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/65998" title="Make unit tests build faster. ">r65998</a> | chris_kohlhoff | 2010-10-16 15:30:12 +1100 (Sat, 16 Oct 2010) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Make unit tests build faster. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/66002" title="Add a test case for bug where a deadline timer never fires if the ...">r66002</a> | chris_kohlhoff | 2010-10-16 16:13:46 +1100 (Sat, 16 Oct 2010) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Add a test case for bug where a deadline timer never fires if the io_service is run in a background thread. N.B. fails only on platforms that use kqueue. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4568" title="#4568: Bugs: deadline_timer stop at boost-1.4.4 (closed: fixed)">#4568</a>. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/66004" title="Fix the way the kqueue_reactor is interrupted when a new timer is ...">r66004</a> | chris_kohlhoff | 2010-10-16 16:43:03 +1100 (Sat, 16 Oct 2010) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Fix the way the kqueue_reactor is interrupted when a new timer is scheduled. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4568" title="#4568: Bugs: deadline_timer stop at boost-1.4.4 (closed: fixed)">#4568</a>. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/66005" title="Fix a const-correctness issue that prevents valid uses of ...">r66005</a> | chris_kohlhoff | 2010-10-16 17:27:45 +1100 (Sat, 16 Oct 2010) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Fix a const-correctness issue that prevents valid uses of has_service&lt;&gt; from compiling. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4638" title="#4638: Bugs: Compile error using boost::asio::has_service() (closed: fixed)">#4638</a>. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/66006" title="Use lower-case to keep MinGW cross-compilers happy. Refs #4491. ">r66006</a> | chris_kohlhoff | 2010-10-16 18:06:18 +1100 (Sat, 16 Oct 2010) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Use lower-case to keep MinGW cross-compilers happy. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4491" title="#4491: Bugs: asio : WinError.h case incorrect ? (closed: fixed)">#4491</a>. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/66007" title="Don't use deprecated system functions. Refs #4672. ">r66007</a> | chris_kohlhoff | 2010-10-16 18:24:47 +1100 (Sat, 16 Oct 2010) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Don't use deprecated system functions. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4672" title="#4672: Bugs: asio uses deprecated functions from Boost.System (closed: fixed)">#4672</a>. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/66008" title="Ensure close()/closesocket() failures are correctly propagated. Refs ...">r66008</a> | chris_kohlhoff | 2010-10-16 20:47:11 +1100 (Sat, 16 Oct 2010) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Ensure close()/closesocket() failures are correctly propagated. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4573" title="#4573: Bugs: boost/asio/detail/impl/socket_ops.ipp:315: int 'result' shadows ... (closed: fixed)">#4573</a>. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/66009" title="Check return code of InitializeCriticalSectionAndSpinCount. Refs #4574. ">r66009</a> | chris_kohlhoff | 2010-10-16 21:01:14 +1100 (Sat, 16 Oct 2010) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Check return code of <a class="missing wiki">InitializeCriticalSectionAndSpinCount</a>. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4574" title="#4574: Bugs: boost/asio/detail/impl/win_mutex.ipp:57: return value of ... (closed: fixed)">#4574</a>. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/66010" title="Add support for hardware flow control on QNX. Refs #4625. ">r66010</a> | chris_kohlhoff | 2010-10-16 22:04:08 +1100 (Sat, 16 Oct 2010) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Add support for hardware flow control on QNX. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4625" title="#4625: Patches: Can't set or unset serial hardware flow control on QNX (closed: fixed)">#4625</a>. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/66014" title="Always use pselect() on HP-UX, if it is available. Refs #4578. ">r66014</a> | chris_kohlhoff | 2010-10-16 22:39:13 +1100 (Sat, 16 Oct 2010) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Always use pselect() on HP-UX, if it is available. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4578" title="#4578: Patches: asio: always use pselect() on hpux11.31 over select() (closed: fixed)">#4578</a>. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/66017" title="Ensure handler arguments are passed as lvalues. Refs #4744. ">r66017</a> | chris_kohlhoff | 2010-10-16 23:23:56 +1100 (Sat, 16 Oct 2010) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Ensure handler arguments are passed as lvalues. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4744" title="#4744: Bugs: Some handler arguments are not passed as lvalues (closed: fixed)">#4744</a>. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/66018" title="Fix Windows build when thread support is disabled. Refs #4680. ">r66018</a> | chris_kohlhoff | 2010-10-16 23:39:06 +1100 (Sat, 16 Oct 2010) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Fix Windows build when thread support is disabled. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4680" title="#4680: Bugs: error asio compilation with BOOST_ASIO_DISABLE_THREADS (closed: fixed)">#4680</a>. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/66020" title="Timers with expiry times set more than 5 minutes in the future need ...">r66020</a> | chris_kohlhoff | 2010-10-16 23:59:29 +1100 (Sat, 16 Oct 2010) | 3 lines </p> </blockquote> <p> </p> <blockquote> <p> Timers with expiry times set more than 5 minutes in the future need the waitable timer to be periodic. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4745" title="#4745: Bugs: On Windows, timers that expire more than 5 minutes in the future may ... (closed: fixed)">#4745</a>. </p> </blockquote> <p> ........ </p> <blockquote> <p> <a class="changeset" href="https://svn.boost.org/trac10/changeset/66035" title="Version bump. ">r66035</a> | chris_kohlhoff | 2010-10-17 22:33:28 +1100 (Sun, 17 Oct 2010) | 2 lines </p> </blockquote> <p> </p> <blockquote> <p> Version bump. </p> </blockquote> <p> ........ </p> Ticket