Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2005-05-22 09:37:35


David Abrahams <dave_at_[hidden]> writes:

> "Arkadiy Vertleyb" <vertleyb_at_[hidden]> writes:
>
>> "David Abrahams" <dave_at_[hidden]> wrote
>>
>>> >> Okay, how about the one enclosed here, then?
>>> >
>>> > Now you have both size() and size_<> instantiated LIMIT_SIZE times ;-)
>>>
>>> According to Eric, you need something like size_<> to workaround vc++
>>> bugs, though.
>>
>> Not if the expression is simplified. It's really multiple calls to sizeof
>> what drives the compiler crazy.
>>
>>> Okay, let me try one more. I think this one gets close
>>> to the minimal number of instantiations required to work around VC++
>>> bugs.
>>
>> Still, select<> is instantiated LIMIT_SIZE times...
>
> Yes, but not LIMIT_SIZE * N, where N is the number of different types
> passed to BOOST_TYPEOF. So it's a one-time cost, which is better than
> what I posted earlier.

Hmm, I'm no longer certain of that. It's at least LIMIT_SIZE * M,
where M is the number of distinct result types of size().

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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