From cppreference.com: http://coliru.stacked-crooked.com/view?id=0b2cec4d8c69ffaf
http://en.cppreference.com/w/cpp/algorithm/partition