From: Ludovic Rousseau Subject: fix FTBFS #1143673 Use the C++20 version of allocate() Last-Update: 2026-08-23 Forwarded: https://github.com/libofx/libofx/pull/106 --- a/lib/tree.hh +++ b/lib/tree.hh @@ -467,8 +467,8 @@ template void tree::head_initialise_() { - head = alloc_.allocate(1, 0); // MSVC does not have default second argument - feet = alloc_.allocate(1, 0); + head = alloc_.allocate(1); + feet = alloc_.allocate(1); head->parent = 0; head->first_child = 0; @@ -743,7 +743,7 @@ { assert(position.node != head); - tree_node* tmp = alloc_.allocate(1, 0); + tree_node* tmp = alloc_.allocate(1); kp::constructor(&tmp->data); tmp->first_child = 0; tmp->last_child = 0; @@ -773,7 +773,7 @@ // the API change. assert(position.node != head); - tree_node* tmp = alloc_.allocate(1, 0); + tree_node* tmp = alloc_.allocate(1); kp::constructor(&tmp->data, x); tmp->first_child = 0; tmp->last_child = 0; @@ -833,7 +833,7 @@ position.node = feet; // Backward compatibility: when calling insert on a null node, // insert before the feet. } - tree_node* tmp = alloc_.allocate(1, 0); + tree_node* tmp = alloc_.allocate(1); kp::constructor(&tmp->data, x); tmp->first_child = 0; tmp->last_child = 0; @@ -856,7 +856,7 @@ template typename tree::sibling_iterator tree::insert(sibling_iterator position, const T& x) { - tree_node* tmp = alloc_.allocate(1, 0); + tree_node* tmp = alloc_.allocate(1); kp::constructor(&tmp->data, x); tmp->first_child = 0; tmp->last_child = 0; @@ -889,7 +889,7 @@ template iter tree::insert_after(iter position, const T& x) { - tree_node* tmp = alloc_.allocate(1, 0); + tree_node* tmp = alloc_.allocate(1); kp::constructor(&tmp->data, x); tmp->first_child = 0; tmp->last_child = 0; @@ -951,7 +951,7 @@ // replace the node at position with head of the replacement tree at from erase_children(position); - tree_node* tmp = alloc_.allocate(1, 0); + tree_node* tmp = alloc_.allocate(1); kp::constructor(&tmp->data, (*from)); tmp->first_child = 0; tmp->last_child = 0;