Boost C++ Libraries: Ticket #3617: big warnings from simple use of Boost.Concept_check https://svn.boost.org/trac10/ticket/3617 <p> The following code causes at least msvc and gcc to complain loudly: </p> <pre class="wiki">#include &lt;boost/concept_check.hpp&gt; #include &lt;boost/concept/requires.hpp&gt; template&lt;typename T&gt; BOOST_CONCEPT_REQUIRES( ((boost::UnaryFunction&lt;T, void, int &amp;&gt;)), (void)) foo(T const &amp;) { } void bar(int &amp;) {} int main() { foo(&amp;bar); } </pre><p> The problem is that the definition of <a class="missing wiki">UnaryFunction</a> (and most of the concepts) causes a non-static reference data member in a class without a constructor. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3617 Trac 1.4.3 Jeremiah Willcock Tue, 08 Jun 2010 23:41:41 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/3617#comment:1 https://svn.boost.org/trac10/ticket/3617#comment:1 <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">worksforme</span> </li> </ul> <p> This produces no warnings (other than for <code>long long</code>) with GCC 4.5.0 <code>-ansi -pedantic -Wall -Wextra</code> for either Boost trunk or release branches. </p> Ticket