File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -321,7 +321,7 @@ public :
321
321
322
322
// イテレーターアクセス
323
323
iterator begin() noexcept ;
324
- iteratoe end() noexcept ;
324
+ iterator end() noexcept ;
325
325
} ;
326
326
~~~
327
327
@@ -923,7 +923,7 @@ size_type size() const noexcept
923
923
` empty ` は空であればtrue、そうでなければfalseを返す。「空」というのは要素数がゼロという意味だ。
924
924
925
925
~~~ c++
926
- size_type empty () const noexcept
926
+ bool empty () const noexcept
927
927
{
928
928
return size() == 0 ;
929
929
}
@@ -932,7 +932,7 @@ size_type empty() const noexcept
932
932
しかし` size() == 0 ` というのは、` begin() == end() ` ということだ。なぜならば要素数が0であれば、イテレーターのペアはどちらも終端のイテレーターを差しているからだ。本物の` std::vector ` では以下のように実装されている。
933
933
934
934
~~~ c++
935
- size_type empty () const noexcept
935
+ bool empty () const noexcept
936
936
{
937
937
return begin() == end() ;
938
938
}
You can’t perform that action at this time.
0 commit comments