> Nope. The behaviour of cast a type that is bigger than the destination > is undefined. If it works, it is a fluke.
I see. So it was invalid on your platform, not in VC 32-bit. I can see that it is definitely bad cross-platform practice. > You can ommit the parameter name in the function signature. Like this: > > void method(int, char, void*); Thanks for that nugget! I learn something every day. - Rod ---------------------------------------- > Date: Fri, 3 Jan 2014 21:44:14 -0500 > From: [email protected] > To: [email protected] > Subject: Re: Patch: Group Toolbar > > On 03/01/14 09:26 PM, Rodney Rushing wrote: >>> ... and in that case invalid since sizeof(void*) != sizeof(int) >> >> I think that's only true if you want to preserve a pointer through this >> mechanism. I just need 2 bits. > > Nope. The behaviour of cast a type that is bigger than the destination > is undefined. If it works, it is a fluke. > >> >>> That's because you should just comment or remove the variable name from >>> the argument list. Perfectly valid C++ even for Microsoft. >> >> It's an interface. How do you do that without breaking the derived classes? > > You can ommit the parameter name in the function signature. Like this: > > void method(int, char, void*); > > This is perfectly valid. That's what I meant by "remove the variable name". > > Hub > _______________________________________________ > Leocad mailing list > [email protected] > https://list.gerf.org/listinfo/leocad > _______________________________________________ Leocad mailing list [email protected] https://list.gerf.org/listinfo/leocad
