From b3b57d5b2bb1f6a64d71c8a096864cb63c7632c8 Mon Sep 17 00:00:00 2001 From: Sandu Liviu Catalin Date: Fri, 24 Jun 2022 22:48:48 +0300 Subject: [PATCH] Update VecMap.hpp --- module/Core/VecMap.hpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/module/Core/VecMap.hpp b/module/Core/VecMap.hpp index c566510f..76185d37 100644 --- a/module/Core/VecMap.hpp +++ b/module/Core/VecMap.hpp @@ -251,6 +251,20 @@ template < class Key, class T, class Pred = std::equal_to< Key > > struct VecMap return m_Storage.back().second; } + /* -------------------------------------------------------------------------------------------- + * Retrieves a reference to the front of the container. + * Available for internal use only. + */ + reference front() { return m_Storage.front(); } + const_reference front() const { return m_Storage.front(); } + + /* -------------------------------------------------------------------------------------------- + * Retrieves a reference to the back of the container. + * Available for internal use only. + */ + reference back() { return m_Storage.back(); } + const_reference back() const { return m_Storage.back(); } + private: /* --------------------------------------------------------------------------------------------