Boost C++ Libraries: Ticket #4853: Actor is never assignable regardless of the template parameter https://svn.boost.org/trac10/ticket/4853 <p> On November 3, a user reported an issue using multiple Boost.Range adaptors upon a sequence. He produced code similar to this: </p> <p> struct Foo { </p> <blockquote> <p> Foo(const std::string&amp; name, int value) : name_(name), value_(value) </p> <blockquote> <p> { } </p> </blockquote> </blockquote> <blockquote> <blockquote> <p> std::string name_; int value_; </p> </blockquote> </blockquote> <p> }; </p> <p> typedef boost::shared_ptr&lt;Foo&gt; <a class="missing wiki">FooPtr</a>; </p> <p> int range_test_complex() { </p> <blockquote> <p> typedef std::vector&lt;<a class="missing wiki">FooPtr</a>&gt; V; </p> </blockquote> <blockquote> <p> V source; source += </p> <blockquote> <p> boost::make_shared&lt;Foo&gt;("Foo", 10), boost::make_shared&lt;Foo&gt;("Bar", 20), boost::make_shared&lt;Foo&gt;("Baz", 30), boost::make_shared&lt;Foo&gt;("Baz", 30) <em> duplicate is here ; </em></p> </blockquote> </blockquote> <blockquote> <p> std::vector&lt;std::string&gt; result1; std::vector&lt;int&gt; result2; </p> </blockquote> <blockquote> <p> using namespace boost::adaptors; using phx::arg_names::arg1; </p> </blockquote> <blockquote> <p> boost::push_back(result1, source | transformed(phx::bind(&amp;Foo::name_, *arg1)) | uniqued); <em> Fails </em></p> </blockquote> <blockquote> <p> boost::push_back(result2, source | transformed(phx::bind(&amp;Foo::value_, *arg1)) | uniqued); <em> Fails </em></p> </blockquote> <blockquote> <p> return 0; </p> </blockquote> <p> } </p> <p> I investigated the issue and found that replacing the bind expressions solved the problem. The issue appears to have been introduced in revision 57503 by a change intended to remove a warning about being unable to generate the assignment operator. I confirmed with the user that by commenting out line 143 in boost/spirit/home/pheonix/core/actor.hpp that the code compiled and worked as expected. </p> <p> Hence I believe that revision 57503 had the unintended consequence of making the actors non-assignable when they should be assignable. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4853 Trac 1.4.3 Hartmut Kaiser Sun, 14 Nov 2010 17:06:29 GMT <link>https://svn.boost.org/trac10/ticket/4853#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4853#comment:1</guid> <description> <p> What platform does this error occur on? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Thomas Heller</dc:creator> <pubDate>Thu, 20 Jan 2011 08:24:43 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/4853#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4853#comment:2</guid> <description> <p> This is fixed in phoenix V3 </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Joel de Guzman</dc:creator> <pubDate>Thu, 20 Jan 2011 13:06:13 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/4853#comment:3 https://svn.boost.org/trac10/ticket/4853#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> fixed in phoenix-2 as well. next time, please assign phoenix tickets either to me or thomas heller. </p> Ticket Stacee Murphy Wed, 14 Dec 2011 12:40:52 GMT version, milestone changed https://svn.boost.org/trac10/ticket/4853#comment:4 https://svn.boost.org/trac10/ticket/4853#comment:4 <ul> <li><strong>version</strong> <span class="trac-field-old">Boost Development Trunk</span> → <span class="trac-field-new">Boost Release Branch</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.49.0</span> </li> </ul> <p> Hah, Italy demonstrators rally against Berlusconi </p> Ticket