Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 42440

Code that is written to the 2011 version of the C++ standard, sometimes known by its pre-publication name of "C++0x". Use in conjunction with the 'c++' tag.

55 votes
6 answers
43k views

Simple integer range for C++11 range-based for loops

I'm really tired of having to type for (int iSomething = rangeBegin; iSomething < rangeEnd; ++iSomething) { ... } whenever I want to iterate over an integer range (most IDEs help with the typing …
isarandi's user avatar
  • 797
5 votes
1 answer
121 views

Find element yielding the largest value w.r.t. custom function

I made a function to find the element that yields the largest value when put into a custom functor. I think this is missing from the STL. I can think of three ways to do this in STL: Transform the …
isarandi's user avatar
  • 797
4 votes
1 answer
89 views

Zip-like construction of objects from parameter collections

This little function can make object creation much easier. Sometimes you need to switch between representing your data as objects vs. having the members in separate containers. Example: class Foo { …
isarandi's user avatar
  • 797