On Fri, Aug 2, 2013 at 9:36 AM, Joaquín Mª López Muñoz <joaquin@tid.es> wrote:
  std::unique_copy(
    get<name>(taggedNodes).begin(),get<name>(taggedNodes).end(),
    boost::make_function_output_iterator(&dump_entry_name),
    equal_entry_name);
This is O(n), n being the number of total elements.

Ah yes, entries are clustered by keys during iteration whether ordered or hashed, I now realize. Thanks.

Here's my STL-challenged version using BOOST_FOREACH. Less generic of course, but hopefully not buggy. --DD

if (!get<name>(taggedNodes).empty()) {
  int curr_key = get<name>(taggedNodes).begin()->name;
  std::cout << curr_key << std::endl;
  BOOST_FOREACH (const TaggedNodeEntry& x, get<name>(taggedNodes)) {
    if (x.name != curr_key) {
      curr_key = x.name;
      std::cout << curr_key << std::endl;
    }
  }
}