Поделиться через


CAtlList::GetTail

Call this method to return the element at the tail of the list.

E& GetTail( ) throw( ); 
const E& GetTail( ) const throw( );

Возвращаемое значение

Returns a reference to, or a copy of, the element at the tail of the list.

Заметки

If the list is const, GetTail returns a copy of the element at the head of the list. This allows the method to be used only on the right side of an assignment statement and protects the list from modification.

If the list is not const, GetTail returns a reference to the element at the head of the list. This allows the method to be used on either side of an assignment statement and thus allows the list entries to be modified.

In debug builds, an assertion failure will occur if the tail of the list points to NULL.

Пример

See the example for CAtlList::AddTail.

Требования

Header: atlcoll.h

См. также

Основные понятия

CAtlList Class

CAtlList Members

CAtlList::GetTailPosition

CAtlList::GetHead