iter tree<T, tree_node_allocator>::append_child(iter position, T&& x) contains std::swap(tmp->data, x); which enforces the use of std::swap. In my instance I needed to control how the data fields are swapped based on information they contain.
By changing the std::swap call to these 2 statements, I can provide an override swap function:
using std::swap;
swap(tmp->data, x);
If no override function is provided, the default std::swap is used.
iter tree<T, tree_node_allocator>::append_child(iter position, T&& x) contains std::swap(tmp->data, x); which enforces the use of std::swap. In my instance I needed to control how the data fields are swapped based on information they contain. By changing the std::swap call to these 2 statements, I can provide an override swap function: using std::swap; swap(tmp->data, x); If no override function is provided, the default std::swap is used.