Итак, я пытаюсь использовать универсальный функтор сравнения в моем служебном классе.
Я пытаюсь определить его и назвать так
template <class T>
bool AVL_tree<T>::avl_insert(AVL_Node<T> *& top, const AVL_Node<T> * insertNode, bool & taller) {
std::binary_function<T,T,bool>::first_argument_type insertNodeValue;
insertNodeValue = insertNode->data;
std::binary_function<T,T,bool>::second_argument_type topValue;
topValue = insertNode->data;
std::binary_function<T,T,bool>::result_type cmp_result;
cmp_result = comparer(insertNodeValue,topValue);
std::binary_function<T,T,bool>::result_type cmp_result2;
cmp_result2 = comparer(topValue,insertNodeValue);
//Function continues from here
}
Ожидается конкретная ошибка компилятора; перед insertNodeValue
Эта ошибка повторяется для topValue и cmp_result;
Я не очень понимаю, почему это синтаксическая ошибка, я работаю над этой ссылкой:
http://www.cplusplus.com/reference/std/functional/binary_function/