Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
valerianilucrezia committed Feb 23, 2021
1 parent cd52c53 commit fff181c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions c++/iterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@


/*!
@tparam node Template for an object of type node_t.
@tparam T Template for an object of type T that is the pair_type.
@tparam node_t template for an object of type node_t.
@tparam T template for an object of type T that is the pair_type.
*/

template < typename node_t, typename T >
Expand All @@ -37,12 +37,12 @@ class _iterator {

/*!
@brief Constructor of new _iterator object.
@tparam p Raw pointer to a node.
@tparam p raw pointer to a node.
*/
explicit _iterator(node_t* p) : current{p} {}

/*!
@brief Deconstructor of _iterator object.
@brief Default deconstructor of _iterator object.
*/
~_iterator() noexcept = default;

Expand All @@ -61,17 +61,17 @@ class _iterator {

/*!
@brief Overloading of equality operator.
@tparam a References to two iterators.
@tparam b References to two iterators
@tparam a reference to the first iterator.
@tparam b reference to the first iterator.
@return Bool true if they point to the same node, false otherwise.
*/
friend bool operator==(_iterator &a, _iterator &b) { return a.current == b.current; }


/*!
@brief Overloading of inequality operator.
@tparam a References to two iterators.
@tparam b References to two iterators
@tparam a reference to the first iterator.
@tparam b reference to the first iterator.
@return Bool true if they point to different nodes, false otherwise.
*/
friend bool operator!=(_iterator &a, _iterator &b) { return !(a == b); }
Expand Down

0 comments on commit fff181c

Please sign in to comment.