{"id":15048035,"url":"https://github.com/jasujm/enhanced-enum","last_synced_at":"2026-02-10T05:32:08.211Z","repository":{"id":57426570,"uuid":"225055062","full_name":"jasujm/enhanced-enum","owner":"jasujm","description":"First class enums in C++","archived":false,"fork":false,"pushed_at":"2022-12-08T13:43:49.000Z","size":327,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-05T22:40:43.909Z","etag":null,"topics":["code-generation","code-generator","cpp","cpp17","cpp20","cxx","cxx17","cxx20","enum"],"latest_commit_sha":null,"homepage":"https://enhanced-enum.readthedocs.io/","language":"Python","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/jasujm.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-30T18:41:17.000Z","updated_at":"2022-07-26T02:25:12.000Z","dependencies_parsed_at":"2023-01-25T13:46:04.708Z","dependency_job_id":null,"html_url":"https://github.com/jasujm/enhanced-enum","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/jasujm/enhanced-enum","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasujm%2Fenhanced-enum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasujm%2Fenhanced-enum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasujm%2Fenhanced-enum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasujm%2Fenhanced-enum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jasujm","download_url":"https://codeload.github.com/jasujm/enhanced-enum/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasujm%2Fenhanced-enum/sbom","scorecard":{"id":507800,"data":{"date":"2025-08-11","repo":{"name":"github.com/jasujm/enhanced-enum","commit":"f54fa9b58587b58ba0f54afe0a70ad906f26225c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"21 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2024-48 / GHSA-fj7x-q9j7-g6q6","Warn: Project is vulnerable to: PYSEC-2024-230 / GHSA-248v-346w-9cwc","Warn: Project is vulnerable to: PYSEC-2022-42986 / GHSA-43fp-rhv2-5gv8","Warn: Project is vulnerable to: PYSEC-2023-135 / GHSA-xqr8-7jwr-rhp7","Warn: Project is vulnerable to: PYSEC-2024-60 / GHSA-jjg7-2v4v-x38h","Warn: Project is vulnerable to: GHSA-cpwx-vrp4-4pq7","Warn: Project is vulnerable to: GHSA-gmj6-6f8f-6699","Warn: Project is vulnerable to: GHSA-h5c8-rqwp-cp95","Warn: Project is vulnerable to: GHSA-h75v-3vvj-5mfj","Warn: Project is vulnerable to: GHSA-q2x7-8rv6-6q7h","Warn: Project is vulnerable to: PYSEC-2022-42969","Warn: Project is vulnerable to: PYSEC-2023-117 / GHSA-mrwq-x4v8-fh7p","Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: PYSEC-2023-74 / GHSA-j8r2-6x86-q33q","Warn: Project is vulnerable to: GHSA-34jh-p97f-mpxf","Warn: Project is vulnerable to: PYSEC-2023-212 / GHSA-g4mx-q9vg-27p4","Warn: Project is vulnerable to: GHSA-pq67-6m6q-mj2v","Warn: Project is vulnerable to: PYSEC-2023-192 / GHSA-v845-jxx5-vc9f","Warn: Project is vulnerable to: PYSEC-2024-187 / GHSA-rqc4-2hc7-8c8v","Warn: Project is vulnerable to: GHSA-jfmj-5v4g-7637"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T23:41:50.636Z","repository_id":57426570,"created_at":"2025-08-19T23:41:50.636Z","updated_at":"2025-08-19T23:41:50.636Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29291145,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T03:42:42.660Z","status":"ssl_error","status_checked_at":"2026-02-10T03:42:41.897Z","response_time":65,"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":["code-generation","code-generator","cpp","cpp17","cpp20","cxx","cxx17","cxx20","enum"],"created_at":"2024-09-24T21:07:17.230Z","updated_at":"2026-02-10T05:32:08.192Z","avatar_url":"https://github.com/jasujm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Enhanced Enum is a library that gives C++ enums capabilities that they don't\nnormally have:\n\n.. code-block:: c++\n\n   enum class StatusLabel {\n       INITIALIZING,\n       WAITING_FOR_INPUT,\n       BUSY,\n   };\n\n   constexpr auto status = Statuses::INITIALIZING;\n\nTheir value is no longer restricted to integers:\n\n.. code-block:: c++\n\n   static_assert( status.value() == \"initializing\" );\n   static_assert( status == Status::from(\"initializing\") );\n\nThey can be iterated:\n\n.. code-block:: c++\n\n   std::cout \u003c\u003c \"Listing \" \u003c\u003c Statuses::size() \u003c\u003c \" enumerators:\\n\";\n   for (const auto status : Statuses::all()) {\n       std::cout \u003c\u003c status.value() \u003c\u003c \"\\n\";\n   }\n\n...all while taking remaining largely compatible with the fundamental enums:\n\n.. code-block:: c++\n\n   static_assert( sizeof(status) == sizeof(StatusLabel) );\n   static_assert( status == StatusLabel::INITIALIZING );\n   static_assert( status != StatusLabel::WAITING_FOR_INPUT );\n\nWhy yet another enum library for C++?\n-------------------------------------\n\nThere are plethora of options available for application writers that\nwant similar capabilities than this library provides. Why write\nanother instead of picking one of them?\n\nShort answer: Because it solved a problem for me, and I hope it will\nsolve similar problems for other people\n\nLonger answer: There is a fundamental limitations to the capabilities\nof native enums within the standard C++, and in order to cope with\nthem, enum library writers must choose from more or less\nunsatisfactory options:\n\n- Resort to compiler implementation details.  While this is a\n  non-intrusive way to introduce reflection, it's not what I'm after.\n\n- Use macros. By far the most common approach across the ecosystem is\n  to use preprocessor macros to generate the type definitions. To me\n  macros are just another form of code generation. The advantage is\n  that this approach needs standard C++ compiler only. The drawback is\n  the inflexibility of macro expansions.\n\nEnhanced Enum utilizes a proper code generator to create the necessary\nboilerplate for enum types. The generator is written in Python, and\nunlocks all the power and nice syntax that Python provides. The\ngenerated code is clean and IDE friendly. This approach enables the\nenums created using the library to have arbitrary values, not just\nstrings derived from the enumerator names. The drawback is the need to\ninclude another library in the build toolchain.\n\nGetting started\n---------------\n\nThe C++ library is header only. Just copy the contents of the\n``cxx/include/`` directory in the repository to your include path. If\nyou prefer, you can create and install the CMake targets for the\nlibrary:\n\n.. code-block:: console\n\n   $ cmake /path/to/repository\n   $ make \u0026\u0026 make install\n\nIn your project:\n\n.. code-block:: cmake\n\n   find_package(EnhancedEnum)\n   target_link_libraries(my-target EnhancedEnum::EnhancedEnum)\n\nThe enum definitions are created with the EnumECG library written in\nPython. It can be installed using ``pip``:\n\n.. code-block:: console\n\n   $ pip install EnumECG\n\nThe library and code generation API are documented in the user guide\nhosted at `Read the Docs \u003chttps://enhanced-enum.readthedocs.io/\u003e`_.\n\nContact\n-------\n\nThe author of the library is Jaakko Moisio. For feedback and\nsuggestions, please contact jaakko@moisio.fi.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasujm%2Fenhanced-enum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjasujm%2Fenhanced-enum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasujm%2Fenhanced-enum/lists"}