
On 5/20/2010 7:54 PM, Krishna Achuthan wrote:
daniel@boostpro.com wrote:
Here's one without decltype. The changes needed were pretty minor. It might still be possible to reduce the number of instantiations. For instance, you could specialize nth_domain<> on some more indicies (I'm guessing the number of super domains should be fairly low), but I don't know what the cost of specialization compared to instantiation is.
When I tried to compile the code using VC 2005, it failed with the following error: error C2064: term does not evaluate to a function taking 1 arguments deduce_domain.cpp 53 After I broke the struct into two pieces like below, it works fine. <snip>
I also had to rearrange Daniel's code to make it work on msvc. For my own purposes, I moved the inheritance and overloads out of the domain types and into wrappers. I'm attaching the code. I'll probably end up using this. -- Eric Niebler BoostPro Computing http://www.boostpro.com