template class list privatestruct node /see figure *}publicclass const_iterator /see figure *}class iterator public const_iterator /see figure *}publiclist/see figure *listconst list rhs /see figure *~list/see figure *list operatorconst list rhs /see figure *listlist &rhs /see figure *list operatorlist &rhs /see figure *iterator beginreturn head->next }const_iterator beginconst return head->next }iterator endreturn tail }const_iterator endconst return tail }int sizeconst return thesizebool emptyconst return size= void clearwhile!emptypop_front)figure list class (part of