From c814e0001e32579a3368a4143e61d9a2896120db Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Tue, 18 Sep 2018 16:36:17 +1000 Subject: [PATCH] stringid: add at method --- stringid.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stringid.hpp b/stringid.hpp index d49f9fdf..d0a5aa70 100644 --- a/stringid.hpp +++ b/stringid.hpp @@ -24,6 +24,9 @@ namespace cruft { /// new ID if the string is not present. id_t operator[] (std::string_view const&); + // provided for symmetry with std member names + id_t at (std::string_view const &name) const { return find (name); } + /////////////////////////////////////////////////////////////////////// id_t add (std::string);