diff options
| -rw-r--r-- | include/tag_list.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/tag_list.h b/include/tag_list.h index b13da3c5a9..d0b80ebb01 100644 --- a/include/tag_list.h +++ b/include/tag_list.h @@ -52,7 +52,7 @@ public: * * Returns a value to the tag at the specified index, or throws an * exception if it is out of range. - * @throw std::out_of_range if given key does not exist + * @throw std::out_of_range if the index is out of range */ value& at(size_t i); const value& at(size_t i) const; @@ -67,6 +67,14 @@ public: const value& operator[](size_t i) const; /** + * @brief Assigns a tag at the given index + * @throw std::bad_cast if the type of the tag does not match the list's + * content type + * @throw std::out_of_range if the index is out of range + */ + void set(size_t i, value&& val); + + /** * @brief Appends the tag to the end of the list * @throw std::bad_cast if the type of the tag does not match the list's * content type @@ -106,7 +114,7 @@ public: private: std::vector<value> tags; - tag_type el_type; + tag_type el_type_; }; } |
