1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-26 03:51:35 +01:00

Added HWAddress<>::operator[].

This commit is contained in:
Matias Fontanini
2013-06-01 12:05:53 -03:00
parent 8c1d71c7b7
commit 3b4dc10211
2 changed files with 15 additions and 0 deletions

View File

@@ -244,6 +244,15 @@ public:
oss << *this;
return oss.str();
}
/**
* \brief Retrieves the i-th storage_type in this address.
*
* \param i The element to retrieve.
*/
storage_type operator[](size_t i) const {
return buffer[i];
}
/**
* \brief Writes this HWAddress in hex-notation to a std::ostream.