Boost logo

Boost :

Subject: Re: [boost] [Block Pointer] Update
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2016-03-11 01:31:21

On 11/03/2016 16:50, Phil Bouchard wrote:
> On 03/10/2016 09:04 PM, Phil Bouchard wrote:
>> I fixed make_block<>() / make_fastblock<>() and now it looks like the
>> following:
>> [...]
>> block_ptr<neuron_sight> t100 = make_block<neuron_sight>("I eat ([a-z]+)
>> then drink ([a-z]+)");
>> t100->sub_[0].second = make_block<neuron_sight>(t100.proxy(),
>> "beef|chicken");
>> t100->sub_[1].second = make_block<neuron_sight>(t100.proxy(),
>> "vodka|water");
> I just discovered that I do not need the stack / heap detection
> algorithm anymore given proxies are now explicit. That'll save me a lot
> of trouble!

I don't really understand the proxy thing, but I sense possible trouble
in a single API name apparently creating different behaviour depending
on the first parameter type, especially when the remaining parameters
appear to be forwarded constructor parameters. (What happens if you
want to construct an object that takes a proxy as a parameter?)

Perhaps the first call should be to a method make_root_block and the
second two to one called make_child_block, or something along those lines?

Boost list run by bdawes at, gregod at, cpdaniel at, john at