{"id":16608408,"url":"https://github.com/curve/flagpp","last_synced_at":"2025-10-29T16:32:26.235Z","repository":{"id":178184857,"uuid":"653337603","full_name":"Curve/flagpp","owner":"Curve","description":"🏴‍☠️ (Opt-In) Bitwise operations on scoped enums","archived":false,"fork":false,"pushed_at":"2024-07-31T14:15:06.000Z","size":37,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-08-01T17:54:51.928Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Curve.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}},"created_at":"2023-06-13T21:37:37.000Z","updated_at":"2024-07-31T14:14:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"f93fbee4-26d8-407e-9e38-891237f1d9c5","html_url":"https://github.com/Curve/flagpp","commit_stats":null,"previous_names":["curve/flags","curve/flagpp"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Curve%2Fflagpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Curve%2Fflagpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Curve%2Fflagpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Curve%2Fflagpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Curve","download_url":"https://codeload.github.com/Curve/flagpp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219857424,"owners_count":16556062,"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":[],"created_at":"2024-10-12T01:26:06.473Z","updated_at":"2025-10-29T16:32:20.954Z","avatar_url":"https://github.com/Curve.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e \n    \u003cimg src=\"assets/logo.svg\" height=312\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\nA C++23 library that provides (opt-in) bit-wise operations for arbitrary `enum class`es\n\n\u003c/div\u003e\n\n\u003c/div\u003e\n\n## 📦 Installation\n\n\u003e [!NOTE]\n\u003e See versions `\u003c 3.0` for C++20 support!\n\n* Using [CPM](https://github.com/cpm-cmake/CPM.cmake)\n  ```cmake\n  CPMFindPackage(\n    NAME           flagpp\n    VERSION        3.0\n    GIT_REPOSITORY \"https://github.com/Curve/flagpp\"\n  )\n  ```\n\n* Using FetchContent\n  ```cmake\n  include(FetchContent)\n\n  FetchContent_Declare(flagpp GIT_REPOSITORY \"https://github.com/Curve/flagpp\" GIT_TAG v3.0)\n  FetchContent_MakeAvailable(flagpp)\n\n  target_link_libraries(\u003ctarget\u003e flagpp)\n  ```\n\n## 📃 Usage\n\n```cpp\n#include \u003cflagpp/flags.hpp\u003e\n\nenum class my_enum\n{\n    none,\n    a = 1 \u003c\u003c 0,\n    b = 1 \u003c\u003c 1,\n    c = 1 \u003c\u003c 2,\n};\n\ntemplate \u003c\u003e\nconstexpr bool flagpp::enabled\u003cmy_enum\u003e = true;\n\n// You can now use `my_enum` for bit-wise operations!\n\nauto flag = my_enum::a;\nflag |= my_enum::b;\nflag |= my_enum::c;\n\nif (flag \u0026 my_enum::b)\n{\n    flag \u0026= ~my_enum::b;\n}\n```\n\n\u003e For more examples see [tests](tests/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcurve%2Fflagpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcurve%2Fflagpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcurve%2Fflagpp/lists"}