Код: Выделить всё
/ forward declarations needed for friend declarations in Blob
template class BlobPtr; // CLAUSE 1
template class Blob; // needed for parameters in operator==
template
bool operator==(const Blob&, const Blob&);
template class Blob {
// each instantiation of Blob grants access to the version of
// BlobPtr and the equality operator instantiated with the same type
friend class BlobPtr;
friend bool operator==(const Blob&, const Blob&); // CLAUSE 2
// other members as in § 12.1.1 (p. 456)
};
а. ПУНКТ 1 --> Обратите внимание, что не имеет чего-то вроде . Правильный ли синтаксис?
b. ПУНКТ 2 --> Является ли после оператора == синтаксически правильным?
Спасибо
Подробнее здесь: https://stackoverflow.com/questions/793 ... uestion-on
Мобильная версия