Ver Fonte

fix: add const version of _size() for list

greatbridf há 3 anos atrás
pai
commit
127fbbd0af
1 ficheiros alterados com 5 adições e 0 exclusões
  1. 5 0
      include/types/list.hpp

+ 5 - 0
include/types/list.hpp

@@ -179,6 +179,11 @@ private:
     node_base_type* head;
     node_base_type* tail;
 
+    const size_t& _size(void) const noexcept
+    {
+        return (static_cast<sentry_node_type*>(head))->value;
+    }
+
     size_t& _size(void) noexcept
     {
         return (static_cast<sentry_node_type*>(head))->value;