|
Boost : |
Subject: Re: [boost] [Root Pointer] Benchmark
From: Phil Bouchard (philippeb8_at_[hidden])
Date: 2016-03-14 19:13:53
On 03/14/2016 12:53 PM, Glen Fernandes wrote:
> I created an example test case for you:
> https://github.com/philippeb8/root_ptr/issues/1
>
> You should only have to modify lines [45, 48].
>
> i.e. Changing "shared_ptr" to "root_ptr" and
> changing "allocate_shared" to your mechanism of
> constructing your root pointer.
>
> If it throws an exception upon running, then your
> root pointer does not support the allocator model.
>
> The example program I wrote there should run
> without throwing an exception:
>
> g++ -std=c++14 -o example example.cpp && ./example
This won't compile out of the box because I need to comment:
- node<>::static_pool()
- node<>::operator new
- node<>::operator delete
But if you comment out the aforementioned functions then the following
will work without throwing anything:
https://github.com/philippeb8/root_ptr/blob/master/example/allocator.cpp
I could add wrappers, etc. but it works this way.
It looks like I need to cleanup that node_base.hpp header as well.
Thanks,
-Phil
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk