"David Abrahams" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "David B. Held" <[EMAIL PROTECTED]> writes: > > > Is this is a worthwhile idea to pursue? Am I missing any critical > > details? I realize there is still a problem with const vs. non-const > > references, but I won't even try to solve that. ;) > > That's a pretty major problem, though. Your idea also cuts off > implicit conversions.
Do you mean user-defined conversions, because it consumes one from by_ref->T? It's more awkward, but wouldn't calling a named member to get T solve that? I realize the const/non-const& problem is big, but my solution is no worse than the current one using boost::ref(), but eliminates the need for explicitly specifying boost::ref(), doesn't it? The main showstopper I see is that by using size as the switch, you might get small non-copyable objects that try to get passed by value. I suppose allowing user-defined specializations would fix that, though it would be tedious. Dave _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost