File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -396,9 +396,9 @@ struct array_iterator
396
396
Array & a ;
397
397
std::size_t i ;
398
398
399
- array_iterator_begin ( Array & a, std::size_t i )
399
+ array_iterator ( Array & a, std::size_t i )
400
400
: a( a ), i(i) { }
401
-
401
+
402
402
//いま参照している要素へのリファレンスを返す
403
403
Array::reference operator *()
404
404
{
@@ -420,13 +420,13 @@ struct array
420
420
// 先頭要素のイテレーター
421
421
iterator begin()
422
422
{
423
- return array ( *this, 0 ) ;
423
+ return array_iterator ( *this, 0 ) ;
424
424
}
425
425
426
426
// 末尾要素へのイテレーター
427
427
iterator end()
428
428
{
429
- return array ( *this, N-1 ) ;
429
+ return array_iterator ( *this, N-1 ) ;
430
430
}
431
431
} ;
432
432
~~~
Original file line number Diff line number Diff line change @@ -267,7 +267,7 @@ int main()
267
267
~~~cpp
268
268
int main()
269
269
{
270
- std::array<1, int> a = {0} ;
270
+ std::array<int, 1 > a = {0} ;
271
271
272
272
try { a[1000] ; }
273
273
catch( std::out_of_range & e )
You can’t perform that action at this time.
0 commit comments