Boost C++ Libraries: Ticket #11399: Boost geometry models don't support stateful allocator. https://svn.boost.org/trac10/ticket/11399 <p> The following model class declarations don't contain constructors that take a copy of the allocator types: linestring multi_linestring polygon multi_polygon </p> <p> This makes it impossible to use stateful allocators with geometry models. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11399 Trac 1.4.3 awulkiew Wed, 15 Jul 2015 14:48:04 GMT <link>https://svn.boost.org/trac10/ticket/11399#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11399#comment:1</guid> <description> <p> Indeed, you're right that modern allocator support is missing. </p> <p> 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? </p> <p> 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. </p> <p> 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. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Wed, 15 Jul 2015 15:19:09 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/11399#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11399#comment:2</guid> <description> <p> Since you don't want to break backwards compatibility on the template-template parameter for allocator I can make due with my own geometry type. </p> </description> <category>Ticket</category> </item> </channel> </rss>