Boost C++ Libraries: Ticket #5722: Compilation error when boost/signals.hpp is included before asio.hpp https://svn.boost.org/trac10/ticket/5722 <p> On the <a class="ext-link" href="http://lists.boost.org/boost-users/2011/07/69466.php"><span class="icon">​</span>mailinglist</a> it has been discovered, that including <code>boost/signals.hpp</code> before <code>boost/asio.hpp</code> causes a compile error in <code>asio/detail/impl/signal_set_service.ipp:74</code> saying <em>"boost::signal": use of class template requires template argument list</em>. </p> <p> The following testcase has been used to confirm this under MSVC10: </p> <div class="wiki-code"><div class="code"><pre><span class="cp">#include</span> <span class="cpf">&lt;boost/signals.hpp&gt;</span><span class="cp"></span> <span class="cp">#include</span> <span class="cpf">&lt;boost/asio.hpp&gt;</span><span class="cp"></span> <span class="kt">int</span> <span class="nf">main</span><span class="p">(</span><span class="kt">int</span> <span class="n">argc</span><span class="p">,</span> <span class="kt">char</span> <span class="o">**</span><span class="n">argv</span><span class="p">)</span> <span class="p">{</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span> <span class="p">}</span> </pre></div></div><p> <a class="ext-link" href="http://lists.boost.org/boost-users/2011/07/69475.php"><span class="icon">​</span>Igor R</a> provided the following patch for <code>boost\asio\detail\impl\signal_set_service.ipp:71</code>: </p> <div class="wiki-code"><div class="code"><pre><span class="gd">- signal(signal_number, asio_signal_handler);</span> <span class="gi">+ ::signal(signal_number, asio_signal_handler); </span> </pre></div></div> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5722 Trac 1.4.3 chris_kohlhoff Sat, 08 Oct 2011 21:06:41 GMT <link>https://svn.boost.org/trac10/ticket/5722#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5722#comment:1</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/74815" title="Explicitly specify the signal() function from the global namespace. ...">[74815]</a>) Explicitly specify the signal() function from the global namespace. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5722" title="#5722: Bugs: Compilation error when boost/signals.hpp is included before asio.hpp (closed: fixed)">#5722</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>chris_kohlhoff</dc:creator> <pubDate>Sun, 09 Oct 2011 22:00:09 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/5722#comment:2 https://svn.boost.org/trac10/ticket/5722#comment:2 <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/74863" title="Merge from trunk... Fix compile error in regex overload of ...">[74863]</a>) Merge from trunk... </p> <p> Fix compile error in regex overload of async_read_until.hpp. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5688" title="#5688: Bugs: boost::asio::async_read_until with boost::regex compilation error (closed: fixed)">#5688</a> </p> <p> Explicitly specify the signal() function from the global namespace. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5722" title="#5722: Bugs: Compilation error when boost/signals.hpp is included before asio.hpp (closed: fixed)">#5722</a> </p> <p> Don't read the clock unless the heap is non-empty. </p> <p> Change the SSL buffers sizes so that they're large enough to hold a complete TLS record. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5854" title="#5854: Bugs: asio::ssl::stream holds last 16K until shutdown IF last buffer is on ... (closed: fixed)">#5854</a> </p> <p> Make sure the synchronous null_buffers operations obey the user's non_blocking setting. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5756" title="#5756: Bugs: read_some() with null_buffers blocks in non-blocking mode (closed: fixed)">#5756</a> </p> <p> Set size of select fd_set at runtime when using Windows. </p> <p> Disable warning due to const qualifier being applied to function type. </p> <p> Fix crash due to gcc_x86_fenced_block that shows up when using the Intel C++ compiler. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5763" title="#5763: Patches: Segmentation fault in ASIO signal handler (closed: fixed)">#5763</a> </p> <p> Specialise operations for buffer sequences that are arrays of exactly two buffers. </p> <p> Initialise all OpenSSL algorithms. </p> <p> Fix error mapping when session is gracefully shut down. </p> <p> Various performance improvements: </p> <ul><li>Split the task_io_service's run and poll code. </li></ul><ul><li>Use thread-local operation queues in single-threaded use cases (i.e. concurrency_hint is 1) to eliminate a lock/unlock pair. </li></ul><ul><li>Only fence block exit when a handler is being run directly out of the io_service. </li></ul><ul><li>Prefer x86 mfence-based fenced block when available. </li></ul><ul><li>Use a plain ol' long for the atomic_count when all thread support is disabled. </li></ul><ul><li>Allow some epoll_reactor speculative operations to be performed without holding the lock. </li></ul><ul><li>Improve locality of reference by performing an epoll_reactor's I/O operation immediately before the corresponding handler is called. This also improves scalability across CPUs when multiple threads are running the io_service. </li></ul><ul><li>Pass same error_code variable through to each operation's complete() function. </li></ul><ul><li>Optimise creation of and access to the io_service implementation. </li></ul><p> Remove unused state in HTTP server examples. </p> <p> Add latency test programs. </p> Ticket