最新の?forループ

  • 繰り返しも再利用可能なクラスに(無駄に)できる
  • boost::counting_iteratorというのがあるのでそれをRangeにする・・・ダウンロード

[]std[][]::[][]vector[][]<[][]int[][]> [][]vec[][];[]
[]int[] []ans[][][] = { [][]0[][], [][]1[][], [][]2[][], [][]3[][], [][]4[][] };[]

[]BOOST_FOREACH[][] ([][]int[] []i[][], [][]oven[][]::[][]make_counting_range[][]([][]0[][], [][]5[][])) {[]
[]vec[][].[][]push_back[][]([][]i[][]);[]
[]}[]

[]PSTADE_TEST[][]( [][]oven[][]::[][]equal[][]([][]vec[][], [][]ans[][]) );[]
[]vec[][].[][]clear[][]();[]

[]BOOST_FOREACH[][] ([][]int[] []i[][], [][]oven[][]::[][]zero_to[][]([][]5[][])) {[]
[]vec[][].[][]push_back[][]([][]i[][]);[]
[]}[]

[]PSTADE_TEST[][]( [][]oven[][]::[][]equal[][]([][]vec[][], [][]ans[][]) );[]