www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Is anyone working on a new std.variant?

reply =?ISO-8859-1?Q?Alex_R=F8nne_Petersen?= <alex lycus.org> writes:
Hi,

See title. I recently came across a bunch of pure/nothrow issues with 
std.variant and fixing them is just not possible with the current design 
(dynamic operator dispatch). I'd literally have to rewrite the whole 
thing or use some extremely dirty hacks resulting in implementation 
defined behavior. I'd rather rewrite it, but not if someone's already 
done it.

-- 
Alex Rønne Petersen
alex lycus.org
http://lycus.org
Aug 31 2012
next sibling parent Jonathan M Davis <jmdavisProg gmx.com> writes:
On Friday 31 August 2012 10:55:15 Alex R=C3=B8nne Petersen wrote:
 Hi,
=20
 See title. I recently came across a bunch of pure/nothrow issues with=
 std.variant and fixing them is just not possible with the current des=
ign
 (dynamic operator dispatch). I'd literally have to rewrite the whole
 thing or use some extremely dirty hacks resulting in implementation
 defined behavior. I'd rather rewrite it, but not if someone's already=
 done it.
Robert Jacques did, but I don't know what its current status is. He was= =20 supposedly going to submit it for review for Phobos, but it seems to ha= ve=20 fallen through the cracks. And I think that Dmitry has been doing some = work on=20 it recently as well, but I don't think that he's yet embarked on rewrit= ing the=20 whole thing. - Jonathan M Davis
Aug 31 2012
prev sibling next sibling parent "Mehrdad" <wfunction hotmail.com> writes:
On Friday, 31 August 2012 at 08:55:18 UTC, Alex Rønne Petersen 
wrote:
 Hi,

 See title. I recently came across a bunch of pure/nothrow 
 issues with std.variant and fixing them is just not possible 
 with the current design (dynamic operator dispatch). I'd 
 literally have to rewrite the whole thing or use some extremely 
 dirty hacks resulting in implementation defined behavior. I'd 
 rather rewrite it, but not if someone's already done it.
Sounds like it's not a problem with std.variant specifically, but conditional attributes in general. We'd need something like nothrow(condition) to make things work out nicely, I think.
Aug 31 2012
prev sibling parent Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 8/31/12 4:55 AM, Alex Rønne Petersen wrote:
 Hi,

 See title. I recently came across a bunch of pure/nothrow issues with
 std.variant and fixing them is just not possible with the current design
 (dynamic operator dispatch). I'd literally have to rewrite the whole
 thing or use some extremely dirty hacks resulting in implementation
 defined behavior. I'd rather rewrite it, but not if someone's already
 done it.
There's some pent-up work on inference of pure and nothrow for template functions. Should such be of help? Andrei
Aug 31 2012