For optimal AA lookup, this idiom is also nice if you only need the result for one line:

  if (auto found = key in AA)
    do_stuff (found);

http://idioms.in/

Reply via email to