{"id":24739502,"url":"https://github.com/notixbit/ntbpp","last_synced_at":"2026-04-15T18:31:07.755Z","repository":{"id":47943789,"uuid":"253327997","full_name":"notixbit/ntbpp","owner":"notixbit","description":"NTB++ is a cross-platform header-only utility library for C++ \u003e= 17","archived":false,"fork":false,"pushed_at":"2026-01-24T19:24:54.000Z","size":419,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-25T08:27:22.562Z","etag":null,"topics":["c-plus-plus","c-plus-plus-17","colors","cplusplus","cpp","cpp17","cross-platform","ctest","header-only","linux","macos","osx","templates","types","unit-testing","unix","util","utility","vcpkg","windows"],"latest_commit_sha":null,"homepage":"https://notixbit.github.io/ntbpp/namespaces.html","language":"C++","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/notixbit.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","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":"2020-04-05T20:40:28.000Z","updated_at":"2026-01-24T19:24:38.000Z","dependencies_parsed_at":"2025-10-19T10:19:20.755Z","dependency_job_id":"a947cf05-48a3-42bf-bdd9-d6fac92abd85","html_url":"https://github.com/notixbit/ntbpp","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/notixbit/ntbpp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notixbit%2Fntbpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notixbit%2Fntbpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notixbit%2Fntbpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notixbit%2Fntbpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/notixbit","download_url":"https://codeload.github.com/notixbit/ntbpp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notixbit%2Fntbpp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31854600,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: 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":["c-plus-plus","c-plus-plus-17","colors","cplusplus","cpp","cpp17","cross-platform","ctest","header-only","linux","macos","osx","templates","types","unit-testing","unix","util","utility","vcpkg","windows"],"created_at":"2025-01-27T22:58:56.102Z","updated_at":"2026-04-15T18:31:07.423Z","avatar_url":"https://github.com/notixbit.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Notixbit C++ Utility Library (NTB++)\r\n\r\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/notixbit/ntbpp/master/LICENSE) \r\n[![CMake Test (Linux)](https://github.com/notixbit/ntbpp/actions/workflows/cmake-linux.yml/badge.svg)](https://github.com/notixbit/ntbpp/actions/workflows/cmake-linux.yml)\r\n[![CMake Test (Windows)](https://github.com/notixbit/ntbpp/actions/workflows/cmake-win.yml/badge.svg)](https://github.com/notixbit/ntbpp/actions/workflows/cmake-win.yml)\r\n[![CMake Test (macOS)](https://github.com/notixbit/ntbpp/actions/workflows/cmake-macos.yml/badge.svg)](https://github.com/notixbit/ntbpp/actions/workflows/cmake-macos.yml)\r\n[![CodeQL Analysis](https://github.com/notixbit/ntbpp/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/notixbit/ntbpp/actions/workflows/codeql-analysis.yml)\r\n[![Generate Docs](https://github.com/notixbit/ntbpp/actions/workflows/docs.yml/badge.svg)](https://github.com/notixbit/ntbpp/actions/workflows/docs.yml)\r\n\r\nNTB++ is a cross-platform header-only utility library for C++ \u003e= 17.\r\n\r\nIt includes Colors, Templates \u0026 Types.\r\nUseful for printing colors, ``std::map`` and ``std::vector`` into ``std::cout``.\u003cbr\u003e\r\nA couple of common typealiases (typedefs) like ``String``, ``UInt``, ``StringMap``, ``StringMapOf\u003cType\u003e`` are included as well.\u003cbr\u003e\r\n\r\nMotivation:\r\n\r\nWe developed this lib as part of a program for a customer,\u003cbr\u003e\r\nand we figured it might benefit other developers too.\r\n\r\n## Table of contents\r\n\r\n- [Namespaces](#namespaces)\r\n    - [Ntb](#ntb)\r\n    - [Ntb::Types](#ntbtypes)\r\n    - [Ntb::Templates](#ntbtemplates)\r\n    - [Ntb::Colors](#ntbcolors)\r\n- [Build](#build)\r\n- [Install](#install)\r\n- [Testing](#testing)\r\n- [Usage (Ntb::Colors)](#usage-ntbcolors)\r\n- [Documentation](https://notixbit.github.io/ntbpp/namespaces.html)\r\n- [Roadmap](#roadmap)\r\n- [Contributing](#contributing)\r\n- [License](#license)\r\n\r\n---\r\n\r\n## Namespaces\r\n\r\n### ``Ntb``\r\n\r\n```cpp\r\nusing namespace Ntb;\r\n```\r\n\r\nExposes the following namespaces:\r\n\r\n```cpp\r\nnamespace Ntb::Types\r\nnamespace Ntb::Templates\r\nnamespace Ntb::Colors\r\n```\r\n\r\n---\r\n\r\n### ``Ntb::Types``\r\n\r\n```cpp\r\nusing namespace Ntb::Types;\r\n```\r\n\r\nExposes the following types:\r\n\r\n```cpp\r\nusing Bool\r\nusing Char\r\nusing UChar\r\nusing Short\r\nusing UShort\r\nusing Int\r\nusing UInt\r\nusing Long\r\nusing LongLong\r\nusing ULong\r\nusing ULongLong\r\nusing String\r\nusing MapOf\u003cType,Type2\u003e\r\nusing StringMapOf\u003cType\u003e\r\nusing StringMap\r\nusing Vector\u003cType\u003e\r\n```\r\n\r\n---\r\n\r\n### ``Ntb::Templates``\r\n\r\n```cpp\r\nusing namespace Ntb::Templates;\r\n```\r\n\r\nExposes the following templates:\r\n\r\n```cpp\r\n/**\r\n * Overloads the '\u003c\u003c' cout operator to recognize vectors.\r\n *\r\n * @param The vector of type \u003cT\u003e.\r\n * @return ostream.\r\n */\r\nstd::ostream \u0026operator\u003c\u003c(std::ostream \u0026os, const Vector\u003cT\u003e \u0026v)\r\n/**\r\n * Overloads the '\u003c\u003c' cout operator to recognize maps.\r\n * \r\n * Prints a newline for all elements but the last.\r\n *\r\n * @param The map of type \u003cT,U\u003e.\r\n * @return ostream.\r\n */\r\nstd::ostream \u0026operator\u003c\u003c(std::ostream \u0026os, const MapOf\u003cT,U\u003e \u0026v)\r\n```\r\n\r\n\u003e ``Ntb::Templates`` makes use of ``Ntb::Types`` and exposes it.\r\n\r\n---\r\n\r\n### ``Ntb::Colors``\r\n\r\n```cpp\r\nusing namespace Ntb::Colors;\r\n```\r\n\r\nExposes the following utilities for coloring ``std::cout`` output:\r\n\r\n```cpp\r\nenum Colors : const UInt\r\n/** Color helpers (optional) */\r\nconst UInt Colors::RESET\r\nconst UInt Colors::BLACK\r\nconst UInt Colors::RED\r\nconst UInt Colors::GREEN\r\nconst UInt Colors::YELLOW\r\nconst UInt Colors::BLUE\r\nconst UInt Colors::MAGENTA\r\nconst UInt Colors::CYAN\r\nconst UInt Colors::WHITE\r\n/**\r\n * Color marker for foreground/background.\r\n *\r\n * @param color The color code.\r\n * @return String with color marker.\r\n */\r\nconst String col(const UInt color = Colors::RESET)\r\n/**\r\n * Color marker for foreground, background and text.\r\n *\r\n * @param str The input text.\r\n * @param front The foreground color code.\r\n * @param back The background color code.\r\n * @return Encapsulated string with color markers.\r\n */\r\nconst String col(const String str, const UInt front, const UInt back = Colors::RESET)\r\n```\r\n\r\n\u003e ``Ntb::Colors`` makes use of ``Ntb::Types`` and exposes it.\r\n\r\n---\r\n\r\n## Build\r\n\r\nMin Std: **C++17** \u003cbr /\u003e\r\n(structured bindings, inline, nested namespaces)\r\n\r\nTested against OS:\r\n\r\n- Linux 4.14.154 Ubuntu 18.04.4 LTS x86_64 (Bionic Beaver)\r\n- Ubuntu 24.04.3\r\n- Windows 7 Home Premium SP1 64 bit\r\n- Windows 10 Home/Pro\r\n- Windows Server 2025 (10.0.26100)\r\n- macOS 15.6.1 (24G90)\r\n\r\nTested against Compiler:\r\n\r\n- Clang 9.0.0+\r\n- MSVC 14.28.29910\r\n- MSVC 19.28.29914\r\n- MSVC 19.44.35217\r\n- AppleClang 17.0.0\r\n- GCC 13.3.0\r\n\r\n\r\n#### CMake\r\n\r\nYou can use ``cmake`` to install the include files.\r\n\r\n```\r\ncd ntbpp\r\nmkdir build \u0026\u0026 cd build\r\ncmake ..\r\nmake install\r\n```\r\n\r\nInclude files will be placed into: ``${CMAKE_INSTALL_PREFIX}/include/notixbit/ntbpp``\r\n\r\n---\r\n\r\n## Install\r\n\r\nYou can use vcpkg, git clone or git submodule to install this library.\r\n\r\n### vcpkg\r\n\r\n**vcpkg-configuration.json**\r\n\r\n```json\r\n{\r\n  \"default-registry\": {\r\n    //..... redacted\r\n  },\r\n  \"registries\": [\r\n    {\r\n      \"kind\": \"git\",\r\n      \"repository\": \"https://github.com/notixbit/vcpkg-registry\",\r\n      \"baseline\": \"c4f78a946944d1a51e89bde41cd61b0460eb6a60\",\r\n      \"packages\": [ \"ntbpp\" ]\r\n    }\r\n  ]\r\n}\r\n\r\n```\r\n\r\nRun: ``vcpkg add port ntbpp``\r\n\r\nSee: https://learn.microsoft.com/en-us/vcpkg/consume/git-registries#3---add-private-registries-to-your-vcpkg-configuration-file\r\n\r\n\r\n---\r\n\r\n### Git Clone\r\n\r\n```\r\ngit clone \u003curl\u003e\r\n```\r\n\r\n### Git Submodule\r\n\r\n```\r\ngit submodule add \u003curl\u003e\r\n```\r\n\r\n---\r\n\r\n## Testing\r\n\r\nUnit Testing Framework: CTest\r\n\r\n```\r\nmake all test\r\n```\r\n\r\n---\r\n\r\n## Usage (``Ntb::Colors``)\r\n\r\n```cpp\r\n#include \u003cnotixbit.h\u003e\r\nusing namespace Ntb::Colors;\r\n\r\nstd::cout \r\n  \u003c\u003c col(\"Notixbit Creative\", Colors::WHITE, Colors::RED) \r\n  \u003c\u003c std::endl \u003c\u003c std::endl \r\n  \u003c\u003c col(\"====POLICE==LINE==DO==NOT==CROSS====\", Colors::BLACK, Colors::YELLOW) \r\n  \u003c\u003c std::endl \u003c\u003c std::endl;\r\n```\r\n\r\nResult:\r\n\r\n\u003cimg src=\"./.github/demo.png\" /\u003e\r\n\r\n---\r\n\r\n## Contributing\r\n\r\nYou're very welcome and free to contribute. Thank you.\r\n\r\n---\r\n\r\n## License\r\n\r\n[MIT](LICENSE)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotixbit%2Fntbpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnotixbit%2Fntbpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotixbit%2Fntbpp/lists"}