Boost logo

Boost :

Subject: Re: [boost] [pool] Definition of a static_pool ?
From: John Maddock (boost.regex_at_[hidden])
Date: 2012-04-29 08:44:26


>>> What about placement new?
>>> Or an array_ref (not part of Boost).
>>> Olaf
>>
>> Sorry, I was unclear. I meant that I never figured out how to
>> put std::array at an address of my choice. Unfortunately,
>
> Wouldn't placement new allow you to do just that?

That's what I thought to, assuming say you have 8 32-bit ints at address
"myhardware", then something like:

typedef std::array<volatile std::int32_t, 8> array_type;

array_type* pa = new(myhardware) array_type;

assert(&(*pa[0]) == myhardware);

??

HTH, John.


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