diff --git a/STL_Extension/include/CGAL/Compact_container.h b/STL_Extension/include/CGAL/Compact_container.h index 4ff6fb08246..5c9e7b00567 100644 --- a/STL_Extension/include/CGAL/Compact_container.h +++ b/STL_Extension/include/CGAL/Compact_container.h @@ -402,7 +402,7 @@ public: pointer ret = free_list; free_list = clean_pointee(ret); const auto ts = Time_stamper::time_stamp(ret); - std::allocator_traits::construct(alloc, ret, std::forward(args)...); + new (ret) value_type(std::forward(args)...); Time_stamper::restore_timestamp(ret, ts); Time_stamper::set_time_stamp(ret, time_stamp); CGAL_assertion(type(ret) == USED); diff --git a/STL_Extension/include/CGAL/Concurrent_compact_container.h b/STL_Extension/include/CGAL/Concurrent_compact_container.h index 93ed4495c35..653ea056e74 100644 --- a/STL_Extension/include/CGAL/Concurrent_compact_container.h +++ b/STL_Extension/include/CGAL/Concurrent_compact_container.h @@ -353,7 +353,7 @@ public: pointer ret = init_insert(fl); auto erase_counter = EraseCounterStrategy::erase_counter(*ret); const auto ts = Time_stamper::time_stamp(ret); - std::allocator_traits::construct(m_alloc, ret, std::forward(args)...); + new (ret) value_type(std::forward(args)...); Time_stamper::restore_timestamp(ret, ts); EraseCounterStrategy::set_erase_counter(*ret, erase_counter); return finalize_insert(ret, fl);