Saturday, January 14, 2012

function adapters c++


2 comments:

  1. What is back_inserter(coll2) at line 49 ??

    ReplyDelete
    Replies
    1. back_inserter is a function that takes a container as an argument, and returns an iterator. In order to append to the vector instead of overwriting its contents, we use an adaptor back_insert.

      Delete