Boost logo

Boost :

From: Arno Schödl (aschoedl_at_[hidden])
Date: 2008-08-31 10:09:27


> // 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_[hidden] 
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

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk