Boost logo

Boost :

Subject: Re: [boost] [challenge!] find a common domain
From: Eric Niebler (eric_at_[hidden])
Date: 2010-05-21 00:28:26


On 5/20/2010 7:54 PM, Krishna Achuthan wrote:
> daniel_at_[hidden] 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



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