Boost logo

Boost :

Subject: Re: [boost] [call-traits][param_type] why is sizeof(void*) chosen as the limit for passing by value?
From: John Bytheway (jbytheway+boost_at_[hidden])
Date: 2010-04-17 04:22:52

On 17/04/10 02:19, OvermindDL1 wrote:
> On Fri, Apr 16, 2010 at 5:49 AM, Thorsten Ottosen <nesotto_at_[hidden]> wrote:
>> Jeffrey Hellrung skrev:
>>> You might want the "by-value size limit" to be platform dependent. I can
>>> imagine that the limit for 64-bit systems could arguably be twice that for
>>> 32-bit systems.
>> by using 2*sizeof(int) we should probably get this behavior by default. Do
>> we know any compilers where int does not have word size?
>> But anyway, there might be compiler differences even on the same platform.
> 64-bit compilers, which have int as 32-bit for some (in my opinion)
> very stupid reasons (I like purity)? Perhaps use long, which should
> be 32-bit on 32-bit, and 64-bit on 64-bit systems, and hopefully it
> expands more later on too?

Not on Windows (I believe); long there is 32 bits on both architectures.
 You need to use void* or size_t to get something that matches the


Boost list run by bdawes at, gregod at, cpdaniel at, john at