{"id":25858728,"url":"https://github.com/bumbelbee777/cxxutil","last_synced_at":"2025-06-18T06:32:55.835Z","repository":{"id":162103199,"uuid":"620005284","full_name":"bumbelbee777/cxxutil","owner":"bumbelbee777","description":"A C++ library containing an implementation of the STL and other data structures and/or containers.","archived":false,"fork":false,"pushed_at":"2023-12-24T21:46:56.000Z","size":61,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-01T20:43:58.446Z","etag":null,"topics":["c-plus-plus","cpp","cpp20","header-only","std","stl","stl-containers","stl-files"],"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/bumbelbee777.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":"2023-03-27T20:58:58.000Z","updated_at":"2023-04-09T18:42:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"a6569b44-4f6a-467e-a618-e784635b0e84","html_url":"https://github.com/bumbelbee777/cxxutil","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bumbelbee777/cxxutil","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bumbelbee777%2Fcxxutil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bumbelbee777%2Fcxxutil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bumbelbee777%2Fcxxutil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bumbelbee777%2Fcxxutil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bumbelbee777","download_url":"https://codeload.github.com/bumbelbee777/cxxutil/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bumbelbee777%2Fcxxutil/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260506100,"owners_count":23019410,"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":["c-plus-plus","cpp","cpp20","header-only","std","stl","stl-containers","stl-files"],"created_at":"2025-03-01T20:30:02.439Z","updated_at":"2025-06-18T06:32:50.818Z","avatar_url":"https://github.com/bumbelbee777.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cxxutil.\n\nA lightweight and freestanding C++20 library implementing various STL containers, allocators and other data structures such as:\n- Vectors (`Vector\u003cT\u003e`).\n- Arrays (`Array\u003cT\u003e`).\n- Stacks (`Stack\u003cT\u003e`).\n- Linked lists (`LinkedList\u003cT\u003e`).\n- Binary search tree (`BinarySearchTree\u003cT\u003e`).\n- Functions (`Function\u003cT\u003e`).\n- Random access iterator (`Iterator\u003cT\u003e`).\n- Optional types (`Optional\u003cT\u003e`).\n- Mutable and non-mutable strings (`String\u003cT\u003e` and `StringView\u003cT\u003e` respectively).\n- Queues (`Queue\u003cT\u003e`).\n- Heap allocator (`HeapAllocator\u003cT\u003e`).\n- Exceptions (`Exception`, `ExceptionPointer`).\n- Smart pointers like boxes, unique and shared pointers (`Box\u003cT\u003e`, `UniquePointer\u003cT\u003e` and `SharedPointer\u003cT\u003e` respectively).\n- Maps and hashmaps (`Map\u003cT, U\u003e` and `Hashmap\u003cT, U\u003e` respectively).\n- Regular expressions (`Regex`).\n- Slices, both mutable and immutable (`Slice\u003cT\u003e` and `ConstSlice\u003cT\u003e` respectively).\n- Graphs (`Graph\u003cT\u003e`).\n- Spinlocks and mutexes (`Spinlock` and `Mutex\u003cT\u003e` respectively).\n- FNV-1a algorithm and djb2 hashing algorithm for strings (`Hash\u003cT\u003e` and `Hash\u003cString\u003e` respectively).\n- Pairs and tuples (`Pair\u003cT, U\u003e` and `Tuple\u003cT...\u003e` respectively).\n- C++20 string formatting and three-way comparison support.\n- Complex numbers and quaternions (`Complex\u003cT\u003e` and `Quaternion\u003cT\u003e` respectively).\n\nAnd more!\n\n**Keep in mind it's still a work in progress and many features are incomplete and/or won't work as intended.**\n\n# Example\n\n```cxx\n#include \u003ciostream\u003e\n#include \u003cAll.h\u003e \n\nusing namespace Cxxutil;\n\nint main(int argv, char **argv) {\n  \tBinarySearchTree\u003cint\u003e bst;\n  \tbst.Insert(5);\n  \tbst.Insert(2);\n  \tbst.Insert(8);\n  \tbst.Insert(1);\n  \tbst.Insert(4);\n \tbst.Insert(7);\n  \tbst.Insert(9);\n\n  \tstd::cout \u003c\u003c \"Binary Search Tree:\\n\";\n  \tbst.ForEach([](int\u0026 value, int index) {\n    \t    std::cout \u003c\u003c index \u003c\u003c \": \" \u003c\u003c value \u003c\u003c '\\n';\n  \t});\n\n  \tstd::cout \u003c\u003c \"Inorder traversal:\\n\";\n  \tbst.InOrderTraversal(std::cout);\n  \tstd::cout \u003c\u003c \"\\n\";\n\n  \tstd::cout \u003c\u003c \"Preorder traversal:\\n\";\n  \tbst.PreOrderTraversal(std::cout);\n  \tstd::cout \u003c\u003c \"\\n\";\n\n  \tstd::cout \u003c\u003c \"Postorder traversal:\\n\";\n  \tbst.PostOrderTraversal(std::cout);\n  \tstd::cout \u003c\u003c \"\\n\";\n\n  \tstd::cout \u003c\u003c \"Searching for value 7: \" \u003c\u003c std::boolalpha \u003c\u003c bst.Search(7) \u003c\u003c '\\n';\n  \tstd::cout \u003c\u003c \"Searching for value 3: \" \u003c\u003c std::boolalpha \u003c\u003c bst.Search(3) \u003c\u003c '\\n';\n\n  \tbst.Remove(2);\n  \tstd::cout \u003c\u003c \"After removing value 2:\\n\";\n  \tbst.ForEach([](int\u0026 Value, int Index) {\n    \t    std::cout \u003c\u003c index \u003c\u003c \": \" \u003c\u003c value \u003c\u003c '\\n';\n  \t});\n\n  \tLinkedList\u003cint\u003e ll;\n  \tll.Append(1);\n  \tll.Append(2);\n  \tll.Append(3);\n  \tll.Append(4);\n  \tll.Append(5);\n\n        Queue\u003cint\u003e queue;\n        queue.Enqueue(1);\n        queue.Enqueue(2);\n        queue.Enqueue(3);\n        queue.Enqueue(4);\n        queue.Enqueue(5);\n\n        std::cout \u003c\u003c \"Queue:\\n\";\n        while(!queue.IsEmpty()) {\n            std::cout \u003c\u003c queue.Front() \u003c\u003c '\\n';\n            queue.Dequeue();\n        }\n\n\tStack\u003cint\u003e MyStack;\n\tStack.Push(1);\n\tStack.Push(2);\n\tStack.Push(3);\n\tStack.Push(4);\n\tStack.Push(5);\n\tMyStack.ForEach([\u0026](int \u0026Item, int Index) {\n\t\tstd::cout \u003c\u003c Item \u003c\u003c '\\n';\n\t});\n  \treturn 0;\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbumbelbee777%2Fcxxutil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbumbelbee777%2Fcxxutil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbumbelbee777%2Fcxxutil/lists"}