std.variant Is Everything Cool About D

Walter Bright newshound2 at digitalmars.com
Fri Mar 30 18:53:28 UTC 2018


On 3/29/2018 12:32 PM, Walter Bright wrote:
> On 3/29/2018 10:30 AM, 12345swordy wrote:
>> There are some quite criticisms being made in the comments section.
> 
> The main criticism is a misunderstanding about std.variant's allocation 
> strategy. I have been trying to correct that.

Part of the problem is the documentation for std.variant is not clear about when 
memory allocation happens. It also is not clear that "boxing" means "allocates 
space for the data on the GC heap and stores a pointer to it in the variant".


More information about the Digitalmars-d-announce mailing list