Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #821 (closed enhancement: fixed)

Opened 16 years ago

Last modified 15 years ago

Automatic conversion of arguments to variadic argument functions into Variant

Reported by: larsivi Assigned to: DRK
Priority: major Milestone: 0.99.9
Component: Core Functionality Version: 0.99.3 Triller
Keywords: triage Cc: aarti_pl

Description

Automatic conversion of arguments to variadic argument functions into Variant should be possible (Boxer has it).

DRK in #676:

Agreed. I've just never gotten around to writing it, since I've never needed it. I will likely get around to 3. eventually, just haven't had time as of yet.

Attachments

821-Variant-vararg.patch (34.3 kB) - added by DRK on 04/17/09 07:18:18.
Updated patch. Adds (TypeInfo?,void*) constructor. Also contains a massive cleanup of the code, removing a ton of cruft and crushing a few potential bugs. Fixed potential vararg bug with LDC,

Change History

02/28/08 23:10:20 changed by larsivi

  • milestone changed from 0.99.5 to 0.99.6.

04/27/08 09:08:53 changed by larsivi

  • milestone changed from 0.99.6 to 0.99.7.

05/24/08 16:54:21 changed by larsivi

  • keywords set to triage.

06/17/08 09:11:37 changed by larsivi

  • milestone changed from 0.99.7 to 0.99.8.

Daniel seems to no longer be available to write this. Any takers?

10/16/08 21:34:49 changed by larsivi

  • cc set to aarti_pl.

Marcin maybe? :P

03/28/09 12:05:10 changed by larsivi

  • milestone changed from 0.99.8 to 0.99.9.

04/04/09 04:02:36 changed by dhasenan

All that is really needed is a constructor for Variant that takes a void* and a TypeInfo?. It shouldn't be too difficult.

For reference, I've created a Variant type that has such a constructor: http://dsource.org/projects/dmocks/browser/reflect/reflect/variant.d with tests: http://dsource.org/projects/dmocks/browser/dunit/trunk/tests/variant.d

04/14/09 10:51:08 changed by DRK

  • status changed from new to assigned.

Added patch to resolve ticket. I'm waiting to be able to test under GDC and LDC.

GDC doesn't appear to have support for vararg (va_arg appears to be stubbed out) and LDC's implementation looks to be a compiler intrinsic.

04/17/09 07:18:18 changed by DRK

  • attachment 821-Variant-vararg.patch added.

Updated patch. Adds (TypeInfo?,void*) constructor. Also contains a massive cleanup of the code, removing a ton of cruft and crushing a few potential bugs. Fixed potential vararg bug with LDC,

05/23/09 11:07:48 changed by DRK

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [4684]) Added vararg support to Variant for DMD, and reduced the size of Variant instances. Closes #821. Closes #1535.