{"id":18839255,"url":"https://github.com/solareenlo/42cpp-module-08","last_synced_at":"2025-07-12T18:32:21.544Z","repository":{"id":93865664,"uuid":"375616144","full_name":"solareenlo/42cpp-module-08","owner":"solareenlo","description":"C++ practice 08 (STL(vector, stack, deque), iterator, algorithm(find, sort, max, min))","archived":false,"fork":false,"pushed_at":"2021-06-11T00:08:48.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-29T20:18:28.960Z","etag":null,"topics":["42","42born2code","42cursus","42projects","cpp"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/solareenlo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-10T07:53:15.000Z","updated_at":"2021-06-11T00:15:29.000Z","dependencies_parsed_at":"2023-04-29T18:26:44.129Z","dependency_job_id":null,"html_url":"https://github.com/solareenlo/42cpp-module-08","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/solareenlo/42cpp-module-08","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solareenlo%2F42cpp-module-08","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solareenlo%2F42cpp-module-08/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solareenlo%2F42cpp-module-08/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solareenlo%2F42cpp-module-08/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solareenlo","download_url":"https://codeload.github.com/solareenlo/42cpp-module-08/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solareenlo%2F42cpp-module-08/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265032890,"owners_count":23700896,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["42","42born2code","42cursus","42projects","cpp"],"created_at":"2024-11-08T02:42:32.838Z","updated_at":"2025-07-12T18:32:21.509Z","avatar_url":"https://github.com/solareenlo.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 42cpp-module-08\n\n### ex02\n- [C++テンプレートことはじめ::クラス外部にメソッドを書くとき](https://qiita.com/a-beco/items/7709ab80a05ea2d09ea8#%E3%82%AF%E3%83%A9%E3%82%B9%E5%A4%96%E9%83%A8%E3%81%AB%E3%83%A1%E3%82%BD%E3%83%83%E3%83%89%E3%82%92%E6%9B%B8%E3%81%8F%E3%81%A8%E3%81%8D)\n  - 実装を含めたすべての情報が必要となるため、宣言と実装はすべてヘッダファイルに書く必要がある\n- [std::stack](https://cpprefjp.github.io/reference/stack.html)\n- [Programming Place Plus C++編::標準ライブラリ::stack](https://programming-place.net/ppp/contents/cpp/library/010.html)\n  - stack はコンテナアダプタと言って，別に標準で実装されているコンテナを改良して作られるコンテナである\n  - stack はデフォルトでは `deque` をもとに，`bakc()`, `push_back()`, `pop_back()`, `emplace_back()` が使えるようにされている．\n  - stack が使用している元となるコンテナは `container_type` で定義されている\n  - stack のソースコードを見てみると良い\n    - mac の stack のソースコードでは\n    ```c++\n    protected:\n    container_type c;\n    ```\n    と定義されているので，`std::stack::c.begin()` とか，`std::stack::c.end()` とすれば，stack の元となるコンテナの `begin()`, `end()` が使えて，先頭と最後にアクセスできる\n  - ので，stack で iterator を無理やり使いたい場合は，元となるコンテナの iterator を使えば良い．\n\n### ex01\n- [std::vector::back](https://cpprefjp.github.io/reference/vector/vector/back.html)\n- [std::vector::front](https://cpprefjp.github.io/reference/vector/vector/front.html)\n- [std::vector::begin](https://cpprefjp.github.io/reference/vector/vector/begin.html)\n- [std::sort](https://cpprefjp.github.io/reference/algorithm/sort.html)\n- [std::vector](https://cpprefjp.github.io/reference/vector/vector.html)\n- [std::runtime_error](https://cpprefjp.github.io/reference/stdexcept.html)\n  - プログラム実行時にのみ検出可能なエラー（実行時エラー）を示す\n\n### ex00\n- [std::find](https://cpprefjp.github.io/reference/algorithm/find.html)\n- [std::runtime_error](https://cpprefjp.github.io/reference/stdexcept.html)\n  - プログラム実行時にのみ検出可能なエラー（実行時エラー）を示す\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolareenlo%2F42cpp-module-08","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolareenlo%2F42cpp-module-08","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolareenlo%2F42cpp-module-08/lists"}