Boost logo

Boost :

From: Abdullah Sowayan (asowaya_at_[hidden])
Date: 2004-10-18 10:53:14


I am trying to use the Object Pool library. In the documentation I came
across the following (html table):

t.construct(???)

ElementType *

ElementType must have a constructor matching ???; the number of
parameters given must not exceed what is supported through
pool_construct
<http://www.boost.org/libs/pool/doc/implementation/pool_construct.html>

 

Allocates and initializes an object of type ElementType. If out of
memory, returns 0. Amortized O(1).

1) What is "???" referring to?
2) What is I have the following class

class A
{
public:
    A(int i, std::string s);
...
};

How can I create a pool of As? Note that there isn't a constructor A::A(
)
that takes nothing. How can I say that the pool for instance would
initialize
all objects to A::A(1, "Howdy")

Thanks,
Abdul

 


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