
On Thu, 2 Dec 2004 11:25:50 -0500 Doug Gregor <dgregor@cs.indiana.edu> wrote:
Unfortunately, some of them are pretty important. For instance, if one
tried to have a result_type that is an iterator, copying a slot_call_iterator that has not been dereferenced could result in undefined behavior, because the iterator would have been default-constructed and therefore singular. That doesn't make the optimization invalid, of course, but it does limit where we can apply the optimization.
What about a specialization for NO combiner (if you are worried about results being "forgotten" then maybe deduce it if the return type is void. This would still allow everything to work properly when you want a combiner (and it can always be optimized later ;-). In addition, it would allow users to not have to pay the expense of combiner stuff if they are not using it anyway...