aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/symbols.hpp')
-rw-r--r--src/core/symbols.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/symbols.hpp b/src/core/symbols.hpp
index 8dd8cd3..e9cb019 100644
--- a/src/core/symbols.hpp
+++ b/src/core/symbols.hpp
@@ -215,6 +215,11 @@ public:
return value.size();
}
+ size_type get_max_index() const
+ {
+ return value.size() == 0 ? 0 : value.rbegin()->first;
+ }
+
/// \brief check whether the value of the variable is null
/// \return whether the value of the variable is null
bool is_unset(const unsigned index=0) const