Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

for_each on a COM IEnumXxx interface

By: a guest on Feb 26th, 2012  |  syntax: None  |  size: 0.14 KB  |  hits: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. IEnumUnkPtr pEnumUnk;
  2. // ...something that fills in pEnumUnk...
  3. MagicThing m(pEnumUnk);
  4. std::for_each(m.begin(), m.end(), DoSomethingWithUnk);