{"id":40774141,"url":"https://github.com/nessan/utilities","last_synced_at":"2026-01-21T19:03:27.599Z","repository":{"id":235501048,"uuid":"788572996","full_name":"nessan/utilities","owner":"nessan","description":"Some header-only C++ utility functions","archived":false,"fork":false,"pushed_at":"2025-11-09T11:43:10.000Z","size":1969,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-11-09T13:22:01.641Z","etag":null,"topics":["cpp","cpp20","utilities"],"latest_commit_sha":null,"homepage":"https://nessan.github.io/utilities","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nessan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-04-18T17:16:50.000Z","updated_at":"2025-11-09T11:41:50.000Z","dependencies_parsed_at":"2024-04-23T16:50:23.983Z","dependency_job_id":"32549dbb-0f2f-401c-a4e2-e065a14428f7","html_url":"https://github.com/nessan/utilities","commit_stats":null,"previous_names":["nessan/utilities"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/nessan/utilities","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nessan%2Futilities","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nessan%2Futilities/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nessan%2Futilities/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nessan%2Futilities/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nessan","download_url":"https://codeload.github.com/nessan/utilities/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nessan%2Futilities/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28640188,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T18:04:35.752Z","status":"ssl_error","status_checked_at":"2026-01-21T18:03:55.054Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cpp","cpp20","utilities"],"created_at":"2026-01-21T19:03:26.755Z","updated_at":"2026-01-21T19:03:27.589Z","avatar_url":"https://github.com/nessan.png","language":"CMake","readme":"# Project Overview\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"banner.svg\"\u003e\u003c/p\u003e\n\nThe `utilities` library is a small collection of C++ classes, functions, and macros that have proven useful across several projects.\nIt is header-only, so there is nothing to compile or link.\n\nAll non-macro functionality is in the `utilities` namespace.\n\n\u003e [!TIP]\n\u003e You can use any header file in this library on its own — there are no interdependencies.\n\n## Available Facilities\n\n| Focus             | Header File   | Brief Description                                                                                                                   |\n| ----------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------- |\n| [Confirmations][] | `confirm.h`   | Provides several `confirm` macros that improve on the [standard `assert`][] one in various ways.                                    |\n| [Logging][]       | `log.h`       | Provided some very simple logging macros.                                                                                           |\n| [Macros][]        | `macros.h`    | Provides macros commonly used in test programs. \u003cbr\u003e This includes a mechanism to overload macros based on the number of arguments. |\n| [Stopwatch][]     | `stopwatch.h` | Provides the `utilities::stopwatch` class, which you can use to time blocks of code.                                                |\n| [Streams][]       | `stream.h`    | Provides some functions to read lines from a file, ignoring comments and allowing for continuation lines.                           |\n| [Strings][]       | `string.h`    | Provides several useful string functions (e.g., turning strings to uppercase, trimming white space, etc.).                          |\n| [Formatter][]     | `formatter.h` | Provides a specialisation of [`std::formatter`][] for _any_ type that has a `to_string()` method.                                   |\n| [Output][]        | `thousands.h` | Provides functions to imbue output streams and locales with commas that make it easier to read large numbers.                       |\n| [Types][]         | `type.h`      | Provides the function `utilities::type`, which returns a string for a type.                                                         |\n\n\u003e [!WARNING]\n\u003e Microsoft's old traditional preprocessor is not happy with some of our macros, but its newer, cross-platform-compatible one is fine.\n\u003e Add the `/Zc:preprocessor` flag to use that upgrade at compile time.\n\u003e Our `CMake` module `compiler_init` does that automatically for you.\n\n## Convenience Headers\n\nThere are a couple of extra convenience \"include-the-lot\" headers:\n\n-   `utilities.h`: Pulls in all the other header files in the library.\n-   `namespace.h`: Pulls in all the other header files in the library, and follows that with a `using namespace utilities` directive.\n\n## Installation\n\nThis library is header-only, so there is nothing to compile \u0026 link.\nDrop the small `utilities` header directory into a convenient location.\nYou can even use any single header file on its own.\n\nAlternatively, if you are using `CMake`, you can use the standard `FetchContent` module by adding a few lines to your project's `CMakeLists.txt` file:\n\n```cmake\ninclude(FetchContent)\nFetchContent_Declare(utilities URL https://github.com/nessan/utilities/releases/download/current/utilities.zip)\nFetchContent_MakeAvailable(utilities)\n```\n\nThis command downloads and unpacks the current version of `utilities` into your project's build folder.\nYou can then add a dependency on `utilities::utilities`, a `CMake` alias for `utilities`.\n`FetchContent` will automatically ensure the build system knows where to find the downloaded header files and any needed compiler flags.\n\n\u003e [!NOTE]\n\u003e That URL downloads the library's current version—whatever is in the main branch when you run the download.\n\u003e That content may change from time to time.\n\u003e Use a URL like `https://github.com/nessan/utilities/releases/download/2.0.0/utilities.zip` to get a fixed library version.\n\n## Links\n\nHere are links to project's [repository][] and [documentation site][]\n\nThe project uses [Doxytest][], a tool for generating C++ test programs from code embedded in header file comments.\n\nYou can contact me by [email][].\n\n## Copyright and License\n\nCopyright (c) 2022-present Nessan Fitzmaurice. \u003cbr\u003e\nYou can use this software under the [MIT License]\n\n\u003c!-- Reference Links --\u003e\n\n[MIT License]: https://opensource.org/license/mit\n[Doxytest]: https://nessan.github.io/doxytest/\n[repository]: https://github.com/nessan/utilities\n[documentation site]: https://nessan.github.io/utilities\n[email]: mailto:nzznfitz+gh@icloud.com\n[`std::formatter`]: https://en.cppreference.com/w/cpp/utility/format/formatter\n[standard `assert`]: https://en.cppreference.com/w/cpp/error/assert.html\n[Confirmations]: docs/pages/Confirmations.md\n[Formatter]: docs/pages/Formatter.md\n[Logging]: docs/pages/Logging.md\n[Macros]: docs/pages/Macros.md\n[Output]: docs/pages/PrettyPrinting.md\n[Stopwatch]: docs/pages/Stopwatch.md\n[Streams]: docs/pages/StreamFunctions.md\n[Strings]: docs/pages/StringFunctions.md\n[Types]: docs/pages/TypeStrings.md\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnessan%2Futilities","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnessan%2Futilities","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnessan%2Futilities/lists"}