On 30/09/13 08:01, Eric Niebler wrote:
Therefore, to avoid performance issues, I'm considering moving to always
using references (with the default domain behaviour), and relying on
BOOST_FORCEINLINE to make it work as expected.
Why is FORCEINLINE needed?
The scenario is
terminal a, b, c, r;
auto tmp = a*b*c;
r = tmp + tmp;
Assuming everything is held by reference, when used in r, tmp will refer
to a dangling reference (the a*b node).
If everything is inlined, the problem may be avoided because it doesn't
require things to be present on the stack.
Of course, it's quite hacky.
_______________________________________________
proto mailing list
proto@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/proto