{"id":15047634,"url":"https://github.com/caffik/libutils","last_synced_at":"2026-04-06T06:32:47.322Z","repository":{"id":242880944,"uuid":"810747437","full_name":"caffik/libutils","owner":"caffik","description":"C++ header only library ","archived":false,"fork":false,"pushed_at":"2024-09-19T14:41:19.000Z","size":222,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-02T14:35:39.720Z","etag":null,"topics":["cmake","cpp","cpp17","utility"],"latest_commit_sha":null,"homepage":"https://caffik.github.io/libutils/","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/caffik.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":"2024-06-05T09:29:13.000Z","updated_at":"2024-09-19T14:38:39.000Z","dependencies_parsed_at":"2024-06-05T14:25:59.871Z","dependency_job_id":"11962eb0-0760-4039-a818-fdd566c5fd63","html_url":"https://github.com/caffik/libutils","commit_stats":null,"previous_names":["caffik/libutils"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/caffik/libutils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caffik%2Flibutils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caffik%2Flibutils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caffik%2Flibutils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caffik%2Flibutils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/caffik","download_url":"https://codeload.github.com/caffik/libutils/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caffik%2Flibutils/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31463014,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"online","status_checked_at":"2026-04-06T02:00:07.287Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cmake","cpp","cpp17","utility"],"created_at":"2024-09-24T21:01:43.157Z","updated_at":"2026-04-06T06:32:47.305Z","avatar_url":"https://github.com/caffik.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# libutils\n\n## Overview\n\n`libutils` is a C++ utility library that provides a set of useful functions and templates to simplify common programming\ntasks. The library is designed to be lightweight and not difficult to integrate into various projects.\n\n### Requirements\n\n- C++17 or later\n- CMake 3.28 or later\n\n## Project Structure\n\n- `docs/`: Contains the documentation for the library.\n- `include/`: Contains the public headers for the library.\n- `tests/`: Contains unit tests for the library.\n\n### Description\n\n`libutils` includes the following header files:\n\n- `utils/algorithm.hpp`: includes functions for finding the index of the maximum element in a range, copying a range of\n  elements multiple times, finding the first position where two ranges differ starting from the end, and reordering\n  elements in a range based on given indices. The file uses templates to work with different types of iterators and\n  predicates. \n\u003cp\u003e\u003c/p\u003e \n\n- `utils/files.hpp`: provides functionality for reading the contents of a directory and filtering the paths based on a\n  given condition. It uses templates to allow flexibility in the types of containers and predicates used.\n\u003cp\u003e\u003c/p\u003e \n\n- `utils/iterator.hpp`: provides utilities for working with iterators, including functions to advance multiple\n  iterators, compute distance differences between ranges, and determine the longer range between two ranges. It also\n  includes a MultiIterator class template for iterating over multiple iterators simultaneously.\n\u003cp\u003e\u003c/p\u003e \n\n- `utils/numeric.hpp`: contains functions to compute the product and mean of a range of elements. These functions are\n  designed to work with various types of input iterators.\n\u003cp\u003e\u003c/p\u003e \n\n- `utils/tuple.hpp`: provides utilities for working with tuples, including functions to move, swap, and copy elements\n  between tuples. It also includes a pointer_tuple class template that holds a tuple of pointers to elements, allowing\n  for operations on the elements pointed to by the pointers.\n\u003cp\u003e\u003c/p\u003e \n\n- `utils/type_traits.hpp`: includes functionality for checking if a type has a push_back or insert method, removing\n  const, volatile, and reference qualifiers from a type, and invoking a series of functions on a copy of a given\n  argument.\n\u003cp\u003e\u003c/p\u003e \n\n- `utils/utility.hpp`: provides general utility functions, such as a function to get a reference to a value or\n  dereferenced pointer and a function to execute a given function in a compile-time loop. These utilities are designed\n  to simplify common programming tasks and improve code readability.\n\n## Installation\n\n### Using CMake:\n\nTo add `libutils` to your project, you can use CMake's `add_subdirectory` function. First, clone the repository:\n\n```sh\ngit clone https://github.com/caffik/libutils.git\n```\n\nThen, add the following lines to your `CMakeLists.txt`:\n\n```cmake\nadd_subdirectory(libutils)\ntarget_link_libraries(your_target PRIVATE libutils::main)\n```\n\nIt can be also added with `FetchContent`:\n\n```cmake\ninclude(FetchContent)\nFetchContent_Declare(\n    libutils\n    GIT_REPOSITORY https://github.com/caffik/libutils.git\n    GIT_TAG v1.1.2 \n)\nFetchContent_MakeAvailable(libutils)\n```\n\n#### CMake options:\n- `ENABLE_TESTING`: build the tests for the library (default: `OFF`)\n- `ENABLE_DOCS`: build the documentation for the library (default: `OFF`) \n\n### Manual installation:\n\nClone the repository:\n    \n```sh\ngit clone https://github.com/caffik/libutils.git\n```\n\nAdd the `include` directory to your project's include path. Then include the desired header files in your source files:\n\n```cpp\n#include \u003cutils/algorithm.hpp\u003e\n#include \u003cutils/files.hpp\u003e\n```\n\n## Documentation\n\nThe documentation is generated using Doxygen and Sphinx. It is built automatically by CMake. \u003cbr/\u003e \nDocumentation page: [libutils](https://caffik.github.io/libutils/)\n### Requirements:\n- `breathe` (\u003e= 4.35.0)\n- `Doxygen` (\u003e= 1.11.0)\n- `sphinx` (\u003e= 8.0.2)\n\n## Examples\n\nExamples of how to use the library can be found on the library page.\n\n\n\n  \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaffik%2Flibutils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaffik%2Flibutils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaffik%2Flibutils/lists"}