mapbox / earcut.hpp

Fast, header-only polygon triangulation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deprecation of std::allocator::construct

opened this issue · comments

Since function std::allocator::construct is deprecated in c++17 and removed in C++20, i suggest to change the line 107 of earcut.hpp from:
alloc.construct(object, std::forward(args)...);
to:
new (static_cast<void*>(object)) T(std::forward(args)...);

Thanks for giving notice. Resolved using std::allocator_traits in 71f0ca9