digitalmars.D.learn - Variadic opIndexAssign
- AJG (32/32) Aug 14 2005 Hi,
- Ben Hinkle (5/7) Aug 14 2005 something like
Hi, I'm using a variadic version of opIndexAssign, and it seems to work. I dunno if this is a hack or not, but what the heck. In addition, I'm using std.boxer internally. The problem is that I can't streamline the parameter-to-box conversion. Here's an example: My question is, what do I put in __UNKNOWN__? Plan B is to do a manual type-by-type test, like: But this would really suck, as it ruins the whole thing. Surely there's a way to automate that bit of nastiness so that I can do something like: Right? Thanks a ton for the help. --AJG.
Aug 14 2005
something like Box b = box(_arguments[0],_argptr); _argptr += (_arguments[0].tsize() + int.sizeof - 1) & ~(int.sizeof - 1); Someone really should put that argptr increment in a standard place. It's come up twice recently...
Aug 14 2005
Hi,something like Box b = box(_arguments[0],_argptr);Nice! :)_argptr += (_arguments[0].tsize() + int.sizeof - 1) & ~(int.sizeof - 1);I don't get this part. How come the example in the docs doesn't do that?Someone really should put that argptr increment in a standard place. It's come up twice recently...Thanks! --AJG.
Aug 14 2005
Oh, nevermind. I'm a doofus. It's because you didn't use the template macro to get the arg. Right?_argptr += (_arguments[0].tsize() + int.sizeof - 1) & ~(int.sizeof - 1);I don't get this part. How come the example in the docs doesn't do that?Yes, this seems like a good idea. Cheers, --AJG.Someone really should put that argptr increment in a standard place. It's come up twice recently...
Aug 14 2005