Subject: Re: [Boost-bugs] [Boost C++ Libraries] #11399: Boost geometry models don't support stateful allocator.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-07-15 14:48:04
#11399: Boost geometry models don't support stateful allocator.
-------------------------------+--------------------------------------
Reporter: bmccart@⦠| Owner: barendgehrels
Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: geometry
Version: Boost 1.57.0 | Severity: Problem
Resolution: | Keywords: geometry model allocator
-------------------------------+--------------------------------------
Comment (by awulkiew):
Indeed, you're right that modern allocator support is missing.
Unfortunately when the models were implemented in the past some design
decisions were made, i.e. the allocators are passed as template template
parameters. If we want to be backward compatibile we must leave it as it
is. So even if it was allowed to pass stateful allocators objects into the
constructor the user would be able to use only the allocators taking one
type parameter. I'm not sure if that'd be useful in general. Would it meet
your needs?
If we wanted to support modern allocators we would have to reimplement the
existing models which would be a breaking change. Maybe this wouldn't be
that bad because I guess the majority of the users doesn't specify the
internal containers or allocators at all. Or we could implement additional
models existing aside from the ones we have now or enable ones or the
others with a macro definition. None of these solutions is perfect.
Last but not least, Boost.Geometry is generic. The user can implement his
own geometry types with ctors taking allocators or whatever he likes and
adapt these types to Boost.Geometry concepts. So I'm not sure if this
change is needed, though indeed the models could be modernized.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/11399#comment:1> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:18 UTC