{"id":22266696,"url":"https://github.com/andreasfertig/heise-2020-07-cpp-tricks-enums","last_synced_at":"2025-10-26T13:42:35.993Z","repository":{"id":95432261,"uuid":"271497193","full_name":"andreasfertig/heise-2020-07-cpp-tricks-enums","owner":"andreasfertig","description":"Companion source code for \"Scoped Enums in C++\"","archived":false,"fork":false,"pushed_at":"2020-06-11T08:49:11.000Z","size":9,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-26T13:42:35.260Z","etag":null,"topics":["article","cpp","cpp17","cpp20","ct","heise"],"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/andreasfertig.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2020-06-11T08:49:04.000Z","updated_at":"2024-11-28T19:44:40.000Z","dependencies_parsed_at":"2023-06-25T22:53:44.120Z","dependency_job_id":null,"html_url":"https://github.com/andreasfertig/heise-2020-07-cpp-tricks-enums","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andreasfertig/heise-2020-07-cpp-tricks-enums","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreasfertig%2Fheise-2020-07-cpp-tricks-enums","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreasfertig%2Fheise-2020-07-cpp-tricks-enums/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreasfertig%2Fheise-2020-07-cpp-tricks-enums/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreasfertig%2Fheise-2020-07-cpp-tricks-enums/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andreasfertig","download_url":"https://codeload.github.com/andreasfertig/heise-2020-07-cpp-tricks-enums/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreasfertig%2Fheise-2020-07-cpp-tricks-enums/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281114835,"owners_count":26446039,"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","status":"online","status_checked_at":"2025-10-26T02:00:06.575Z","response_time":61,"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":["article","cpp","cpp17","cpp20","ct","heise"],"created_at":"2024-12-03T10:19:58.211Z","updated_at":"2025-10-26T13:42:35.988Z","avatar_url":"https://github.com/andreasfertig.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Companion source code for \"Scoped Enums in C++\"\n\n\n[![Build Status](https://github.com/andreasfertig/heise-2020-07-cpp-tricks-enums/workflows/ci/badge.svg)](https://github.com/andreasfertig/heise-2020-07-cpp-tricks-enums/actions/) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](/LICENSE.txt) \n\n\n## Code examples\n\nThis repository contains runnable source code examples from the article [Scoped Enums in C++](https://www.heise.de/select/ix/2020/7), by [Andreas Fertig](https://andreasfertig.info).\n\n### The layout of the examples\n\nEach example is located in a dedicated directory based on how it appears in the article. Sometimes an example appears more than once. This is usually when it is shown in pieces in the article. In this case, only the first occurrence of an example is kept. Later occurrences are represented by a text-file naming the initial occurrence.\n\n### Running the examples\n\nThe examples are each contained in a single `.cpp` file that can be easily compiled and executed. There is also an `CMakeLists.txt` which can generate IDE projects or used to compile the examples in a terminal. \nThis repo contains a top-level `CMakeLists.txt` which builds all the examples. \n\n### Building the examples\n\nYou can select the compiler by setting the `CXX` environment variable.\n\n```\nmkdir heise-2020-07-cpp-tricks-enums\ncd heise-2020-07-cpp-tricks-enums\ngit clone https://github.com/andreasfertig/heise-2020-07-cpp-tricks-enums\nmkdir build\ncd build\ncmake ../\ncmake --build . -j\n```\n\nAfter that you find all the executables in `heise-2020-07-cpp-tricks-enums/build/bin`.\n\nSome of these examples use the latest C++ standard, so you will need a modern compiler to compile them. The latest stable versions of [GCC](https://gcc.gnu.org/releases.html) or [Clang](https://releases.llvm.org) are recommended.\n\n## Submitting Issues / PRs\n\nI appreciate pull requests which fix errors, or issues which point them out as long as it is about the code. For feedback on the article itself, please write me an email. This repository is about the code only.\n\n\n## License\n\nThe source code is released under the [MIT License](/LICENSE.txt).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreasfertig%2Fheise-2020-07-cpp-tricks-enums","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreasfertig%2Fheise-2020-07-cpp-tricks-enums","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreasfertig%2Fheise-2020-07-cpp-tricks-enums/lists"}