Skip to content

typename を文脈に合うように修正 #161

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions 024-more-array.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ int main()
関数のリファレンスを引数として渡すと、関数の中で変更できてしまう。しかし、上の例のような関数`print`では、引数を書き換える必要はない。この関数を使う人間も、引数を勝手に書き換えないことを期待している。この場合、`const`を付けることで値の変更を防ぐことができる。

~~~cpp
template < typename Container >
void print( Container const & c )
template < typename Array >
void print( Array const & c )
{
for ( std::size_t i = 0 ; i != c.size() ; ++i )
{
Expand Down