Kак понять это перегруженный оператор в двусвязном списке? И зачем здесь проверка на тип записи в файл

template<class T>
ostream& operator << (ostream& ustream, LinkedListParent<T>& obj) {
if (typeid(ustream).name() == typeid(ofstream).name()) 
{
    ustream << obj.num << "\n";
    for (Element<T>* cur = obj.getBegin(); cur != NULL; cur = cur.getNext())
        ustream << current->getValue() << " ";
    return ustream;
}

Ответы (0 шт):