Boost C++ Libraries: Ticket #6848: ref doesn't work with noncopyable object https://svn.boost.org/trac10/ticket/6848 <p> the following code fails to compile with both boost 1.47 and 1.49 (GCC 4.4.4): </p> <pre class="wiki">#include &lt;boost/phoenix.hpp&gt; class A { A(const A&amp;); A&amp; operator=(const A&amp;); public: A() {} const A&amp; operator&lt;&lt;(const char *p) const { return *this; } } g_a; int main() { ( boost::phoenix::ref(g_a) &lt;&lt; boost::phoenix::placeholders::_1 )("test"); } </pre><p> error: 'A::A(const A&amp;)' is private </p> <p> Btw, it also doesn't work with boost::lambda::var, in the same manner. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6848 Trac 1.4.3 Kohei Takahashi Mon, 09 May 2016 16:41:19 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/6848#comment:1 https://svn.boost.org/trac10/ticket/6848#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">duplicate</span> </li> </ul> <p> dup of <a class="assigned ticket" href="https://svn.boost.org/trac10/ticket/6026" title="#6026: Bugs: phoenix block statement tries to copy objects instead of references (assigned)">#6026</a> </p> Ticket