BTW:

::std::allocator_traits<T>::allocate with a hint has the same issues too.

Sent from Mail for Windows

 

From: trtaab trtaab
Sent: Saturday, September 2, 2023 15:22
To: std-proposals@lists.isocpp.org
Subject: PR: std::allocator<T>::allocate is not freestanding

 

Currently there is no way to allocate memory at constexpr context in freestanding environment. This desperately needs a fix.

 

N4958 does not mark std::allocator<T> as freestanding so there is no way to allocate memory in freestanding.

 

This is std::addressof situation 2.0

 

 

Sent from Mail for Windows