Arno Schödl | 31 Aug 16:09
Favicon

Re: lifetime of ranges vs. iterators

>  // Gimme a better name, please!  The abstraction is a thing that
>  // is always used in pairs, where each instance contains some 
>  // redundant information in common.
>  auto concept Factorable<typename T>
>  {
>       typename common_data = void;
>       typename unique_data = T;
>
>       common_data common(T) {}
>       unique_data unique(T x) { return x; }
>       T reconstruct(common_data, unique_data x) { return x; }
>  };

How is the separation of common_data and unique_data different from a separation of ranges and iterators?
If iterators of ranges can rely on their range to exist, this is where common data like functors, end
iterators etc. can be stored.

Arno

--
Dr. Arno Schoedl · aschoedl <at> think-cell.com 
Technical Director 

think-cell Software GmbH · Invalidenstr. 34 · 10115 Berlin, Germany 
http://www.think-cell.com · phone +49-30-666473-10 · toll-free (US) +1-800-891-8091
Directors: Dr. Markus Hannebauer, Dr. Arno Schoedl · Amtsgericht Charlottenburg, HRB 85229

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


Gmane