Boost logo

Boost :

Subject: Re: [boost] [Block Pointer] Update
From: Phil Bouchard (philippeb8_at_[hidden])
Date: 2016-03-10 21:04:42


On 03/10/2016 07:47 PM, Phil Bouchard wrote:
> On 03/09/2016 11:28 PM, Phil Bouchard wrote:
>
> I fixed the problem and now the correct way to use the pointer is by
> passing around a proxy explicitly:
>
> [...]
> block_ptr<neuron_sight> t100 = new block<neuron_sight>("I eat ([a-z]+)
> then drink ([a-z]+)");
> t100->sub_[0].second = block_ptr<neuron_sight>(t100.proxy(), new
> block<neuron_sight>("beef|chicken"));
> t100->sub_[1].second = block_ptr<neuron_sight>(t100.proxy(), new
> block<neuron_sight>("vodka|water"));
>
> Or:
> https://github.com/philippeb8/block_ptr/blob/master/example/t100_test1.cpp#L31
>
>
>
> I will fix make_block<>() to follow this syntax but this is how things
> should be done. Another useful example is by defining the internals of
> a container:

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");

Regards,
-Phil


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk