Boost C++ Libraries: Ticket #7667: boost::adaptors::transformed followed by boost::adaptors::filtered calls function twice https://svn.boost.org/trac10/ticket/7667 <p> When boost::adaptors::transformed is followed by a boost::adaptors::filtered, transformed's function is called twice for each output where filtered's predicate is true. For sample code, please check: </p> <p> <a class="ext-link" href="http://stackoverflow.com/questions/13301062/"><span class="icon">​</span>http://stackoverflow.com/questions/13301062/</a> </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7667 Trac 1.4.3 Neil Groves Mon, 03 Mar 2014 01:58:16 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/7667#comment:1 https://svn.boost.org/trac10/ticket/7667#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">invalid</span> </li> </ul> <p> The function is called upon dereference. This is by design. If often provides optimal performance. When it does not there are many more cases of expensive repetitive dereference than just this, hence a general caching solution is more capable and more broadly applicable. </p> Ticket