{"id":20051892,"url":"https://github.com/p-ranav/small_vector","last_synced_at":"2025-07-08T03:39:39.017Z","repository":{"id":97290657,"uuid":"286103956","full_name":"p-ranav/small_vector","owner":"p-ranav","description":"\"Small Vector\" optimization for Modern C++: store up to a small number of items on the stack","archived":false,"fork":false,"pushed_at":"2021-05-06T14:01:53.000Z","size":71,"stargazers_count":34,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-05T11:44:51.944Z","etag":null,"topics":["array","buffer","container","cpp11","header-only","heap","memory-management","modern-cpp","optimization","single-header","single-header-lib","small","small-buffer-optimization","stack","vector"],"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/p-ranav.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,"zenodo":null}},"created_at":"2020-08-08T19:08:01.000Z","updated_at":"2025-03-23T15:41:28.000Z","dependencies_parsed_at":"2023-06-26T09:00:22.602Z","dependency_job_id":null,"html_url":"https://github.com/p-ranav/small_vector","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/p-ranav/small_vector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-ranav%2Fsmall_vector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-ranav%2Fsmall_vector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-ranav%2Fsmall_vector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-ranav%2Fsmall_vector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/p-ranav","download_url":"https://codeload.github.com/p-ranav/small_vector/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-ranav%2Fsmall_vector/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264191000,"owners_count":23570623,"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":["array","buffer","container","cpp11","header-only","heap","memory-management","modern-cpp","optimization","single-header","single-header-lib","small","small-buffer-optimization","stack","vector"],"created_at":"2024-11-13T12:07:40.578Z","updated_at":"2025-07-08T03:39:39.012Z","avatar_url":"https://github.com/p-ranav.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"small_vector\n============\n\n\"Small Vector\" optimization for Modern C++: store up to a small number of items on the stack\n\n## Example\n\n```cpp\n#include \u003ciostream\u003e\n#include \u003citerator\u003e\n\n#include \u003csmall_vector/small_vector.h\u003e\nusing namespace sv;\n\nint main() {\n \n  // This small vector can hold up to 4 items on the stack\n  small_vector\u003cint, 4\u003e vec{1, 2, 3, 4};\n  \n  // It will move its contents to the heap if it\n  // contains more than four items:\n  vec.push_back(5);\n  \n  // Access and modify contents\n  vec[0] = vec[1] + vec[2];\n\n  // Iterate and print contents\n  std::copy(vec.begin(), vec.end(), std::ostream_iterator\u003cint\u003e(std::cout, \" \"));\n\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp-ranav%2Fsmall_vector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fp-ranav%2Fsmall_vector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp-ranav%2Fsmall_vector/lists"}