Boost C++ Libraries: Ticket #9363: Reference forwarding in phoenix::bind does not work in C++11 https://svn.boost.org/trac10/ticket/9363 <p> When a user-defined function accepts a non-const reference as an argument, this argument is provided as a const reference by phoenix::bind, even though phoenix::bind is invoked with a non-const lvalue. This only appears in C++11 mode, in C++03 this works as expected. </p> <p> I've attached the test case and compile errors from GCC 4.8.1. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9363 Trac 1.4.3 Andrey Semashev Mon, 11 Nov 2013 04:03:27 GMT attachment set https://svn.boost.org/trac10/ticket/9363 https://svn.boost.org/trac10/ticket/9363 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">phoenix_non_const_ref.cpp</span> </li> </ul> <p> A test case to reproduce the problem. </p> Ticket Andrey Semashev Mon, 11 Nov 2013 04:03:46 GMT attachment set https://svn.boost.org/trac10/ticket/9363 https://svn.boost.org/trac10/ticket/9363 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">phoenix_non_const_ref_cxx11.txt</span> </li> </ul> <p> GCC 4.8.1 errors in C++11 mode. </p> Ticket Andrey Semashev Mon, 11 Nov 2013 04:06:27 GMT <link>https://svn.boost.org/trac10/ticket/9363#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9363#comment:1</guid> <description> <p> I might add that this bug affects Boost.Log in a very bad way. It breaks binding user-defined functions as formatters because the output stream is passed to the bound functions by const reference. </p> </description> <category>Ticket</category> </item> <item> <author>John Fletcher <J.P.Fletcher@…></author> <pubDate>Tue, 04 Feb 2014 21:29:06 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9363#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9363#comment:2</guid> <description> <p> I have started to look at this but have not got very far with this yet. I will keep it on my list. John </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Andrey Semashev</dc:creator> <pubDate>Sat, 03 Nov 2018 21:00:56 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/9363#comment:3 https://svn.boost.org/trac10/ticket/9363#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> The test case compiles with gcc 8.2 with Boost 1.68. </p> Ticket