summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/value.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/value.h b/include/value.h
index 4553b3e8f4..2a9ecc0d1a 100644
--- a/include/value.h
+++ b/include/value.h
@@ -85,6 +85,15 @@ public:
explicit operator const std::string&() const;
/**
+ * @brief In case of a tag_compound, accesses a tag by key with bounds checking
+ * @throw std::bad_cast if the tag type is not tag_compound
+ * @throw std::out_of_range if given key does not exist
+ * @sa tag_compound::at
+ */
+ value& at(const std::string& key);
+ const value& at(const std::string& key) const;
+
+ /**
* @brief In case of a tag_compound, accesses a tag by key
* @throw std::bad_cast if the tag type is not tag_compound
* @sa tag_compound::operator[]