File: element.cc

package info (click to toggle)
oxref 2.02.00-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 692 kB
  • sloc: cpp: 1,282; makefile: 131; sh: 48
file content (12 lines) | stat: -rw-r--r-- 247 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
#include "idmap.ih"

string const &IDmap::element(size_t idx, string const &name) const
{
    auto iter = find(name);

    if (iter == end())
        throw runtime_error{ "No entry `" + name + '\'' };

    return iter->second[idx];
}