<div dir="ltr"><div class="gmail_quote">
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Thanks, that worked.  Is there an advantage to using std::generate vs std::for_each for the assignment?<br>

</blockquote>
<div> </div>
<div>std::for_each was originally defined as a non-modifying algorithm:</div>
<div><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#475">http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#475</a></div></div></div>