On Feb 24, 2006, at 4:00 PM, Andy Little wrote:
"Paul Mensonides" wrote
There is a dinstinction between types on which metaprogramming operates (such as 'int' or 'const MyClass') and the types of metaprogramming constructs themselves. The latter need only be structurally compatible with the concept (i.e. the archtype or the Plutonic form of the structure). If the MPL starts making guarantees that metatypes (e.g. a 'vector', a 'list', an 'int_<A>') can be used as a non-metatype, it will lead to either 1) a combinatorial explosion of code or 2) a drastic efficiency hit (because the library will be explicitly rewriting structures after they are built).
I can only go from my experience in pqs where exactly the opposite has happened. After my mpl experience which resulted in an unusable library I redesigned the library around compile- time meta-constants which can be equality compared using is_same. This has dramatically speeded compilation compared with use of mpl (e.g 30 secs to 4 sec for a typical compile) And has solved the previous situation where VC7.1 compiler gave an out of keys message on relatively trivial test cases.
Andy,
I'm just curious but what kind of test are these numbers (30 -> 4
seconds) measuring?
After buying Dave and Aleksy's MPL book, I went ahead and implemented
the
quantity