Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.c++.moderated    |    Moderated discussion of C++ superhackery    |    33,346 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 32,254 of 33,346    |
|    =?ISO-8859-15?Q?Daniel_Kr=FCgler?= to All    |
|    Re: Conditionally make a move_iterator i    |
|    06 May 12 17:03:40    |
   
   From: daniel.kruegler@googlemail.com   
      
   Am 06.05.2012 22:12, schrieb Johannes Schaub:   
   > I wonder whether there are begin / end functions (with a suitable   
   > name) that do the following   
   >   
   > template   
   > auto forward_begin(T &t)   
   > -> decltype(begin(t)) {   
   > return begin(t);   
   > }   
   >   
   > template   
   > auto forward_begin(T &&t)   
   > -> decltype(std::make_move_iterator(begin(t))) {   
   > return std::make_move_iterator(begin(t));   
   > }   
   >   
   > template   
   > auto forward_end(T &t)   
   > -> decltype(end(t)) {   
   > return end(t);   
   > }   
   >   
   > template   
   > auto forward_end(T &&t)   
   > -> decltype(std::make_move_iterator(end(t))) {   
   > return std::make_move_iterator(end(t));   
   > }   
   >   
   > It has occured to me that I think that such a thing could be useful.   
   > Does boost or the C++11 spec define such a beast?   
      
   There is no such thing in the C++11 standard library, but I suggested   
   something similar in   
      
   https://groups.google.com/forum/?hl=de&fromgroups#!searchin/comp   
   lang.c$2B$2B.moderated/inline$20auto$20make_iterator_range/comp.   
   ang.c++.moderated/1BwNTHCFiOs/RQBhTTYeGr0J   
      
   (Search for make_iterator_range in that reply)   
      
   Greetings from Bremen,   
      
   Daniel Krügler   
      
      
   --   
    [ See http://www.gotw.ca/resources/clcm.htm for info about ]   
    [ comp.lang.c++.moderated. First time posters: Do this! ]   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca