Boost logo

Boost :

From: Maxim Yegorushkin (e-maxim_at_[hidden])
Date: 2004-09-06 01:55:02


David Abrahams <dave_at_[hidden]> wrote:

> David Bradley <BradleyJunk_at_[hidden]> writes:
>
>> David Abrahams wrote:
>>
>>> Why mess around? You don't need to use a void*; just use a
>>> void(X::*)(void) for any X. Round-trip reinterpret_cast is
>>> guaranteed to work.
>>>
>>>
>>
>> Well I don't think this is guarenteed sizeof(void (X::*)(void) ==
>> sizeof(void (Y::*)(void). But I'm basing my assumption the VC++
>> compilers implementation which is often a risky thing to do.
>
> Just read the standard. What I said holds.

Only with /vmg command-line switch for VC7+ or pragmas
(http://msdn.microsoft.com/library/en-us/vccore/html/_core_.2f.vmb.2c_2f.vmg.asp)

-- 
Maxim Yegorushkin

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