Code: Select all
std::allocator_traits::construct(alloc, ptr, ... /* parameters of constructors for AllocType::value_type */)
< /code>
Aber hier ist ein MRE: < /p>
#include
#include
#include
template
struct Allocator {
template
void construct(Args&&... args) {
T t { std::forward(args)... };
t.print();
}
};
struct X1 {
int i;
X1(int i) : i(i) { }
void print() { std::cout