Boost logo

Boost Users :

From: Daniel Lidström (daniel.lidstrom_at_[hidden])
Date: 2008-03-28 08:54:33


Ovanes wrote:

[snip]
> What do you think how this allocator will allocate the number
> of these element? Actually in any possible way.
> It can use new[] or new char[sizeof(T)*NumElems] or use an
> own mem-manager. And the worse thing you can't make
> allocator friend of your class, since users of containers can
> pass their own allocators.
> And despite all enumerated facts you will fail to compile,
> since the function address will fail to return the pointer to
> x, because it is prohibited in your case.

Yes, well boost::noncopyable also prohibits something :-) The whole
intent of nondynamic is to prohibit (or make difficult) dynamic
allocation/pointer usage.
Do you think boost::noncopyable has a valid purpose, but nondynamic is less
useful?

-- 
Daniel

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net