From: Anthony Liguori (anthony_at_[hidden])
Date: 2002-11-19 21:50:01
David Abrahams wrote:
>Now can we rename "factory" to "metaclass"? I just want to see smoke
>come out of peoples' ears!
You know, this might be possible... If we can find a way to map members
to function objects somewhat automatically, this might be realistic.
After that, it's a simple sed script ;-)
>>FactoryA b = FactoryA::create<B>();
>>A *a = b(10); // Returns new B(10)
>>c = b;
>>a = c(15); // Returns new B(10)
>I sure hope that's new B(15).
Doh! Sorry about that one :) It definitely is B(15).
>>I haven't submitted yet because it hasn't been updated to the new
>>function class and the documentation isn't finished but since the
>>topic came up, I thought I'd see what people thought.
>>Here's the site:
>Well, I'm excited.
Great! I'll get working on updating it ASAP. If anyone has any ideas
on how to make it even more generic, let me know (I'm very intrigued by
the prospect of metaclasses in C++).
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk