Boost logo

Boost :

Subject: Re: [boost] Proposed templated integer_sort
From: Scott McMurray (me22.ca+boost_at_[hidden])
Date: 2009-01-14 17:58:37


On Wed, Jan 14, 2009 at 17:48, Phil Endecott
<spam_from_boost_dev_at_[hidden]> wrote:
>
> I would hope that a class with no state in it would take no space, but I
> suppose compilers may be dumb about that sometimes.
>

Doesn't the standard require that it have a unique address,
essentially preventing that?

>
>>> I think you can use things like typename RandomAccessIter::value_type
>>> instead of passing *first in order to determine data_type.
>>
>> I tried that, but it didn't compile on my system (MacOSX PPC gcc4.0.1).
>
> That's surprising. Maybe you could distil it down to a minimal example and
> we can all scratch our heads over it.
>

Maybe you can use the MPL metafunction version, with its possible workarounds?

typename boost::iterator_value<RandomAccessIter>::type


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