0

what is difference b/w - for(auto &i : v) and for(auto &&i : v) in cpp ?

I tried to figure it out but I was getting all results simular only so I am just curious to know that both are same or have any difference..

Jason
  • 36,170
  • 5
  • 26
  • 60
  • 2
    It depends on `v`. Please show a [mcve]. – 273K Nov 06 '22 at 07:19
  • 1
    Better dupe: [What's the difference between & and && in a range-based for loop?](https://stackoverflow.com/questions/29320575/whats-the-difference-between-and-in-a-range-based-for-loop) – Jason Nov 06 '22 at 07:43

0 Answers0