{"id":23418203,"url":"https://github.com/amazingmonster/macaron","last_synced_at":"2025-04-12T11:33:09.154Z","repository":{"id":258274652,"uuid":"866866579","full_name":"AmazingMonster/macaron","owner":"AmazingMonster","description":"A C++ preprocessor library for metaprogramming testing.","archived":false,"fork":false,"pushed_at":"2025-01-05T23:55:34.000Z","size":177,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-26T06:11:38.412Z","etag":null,"topics":["cpp","macros","metaprogramming"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AmazingMonster.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2024-10-03T02:43:37.000Z","updated_at":"2025-01-12T08:45:39.000Z","dependencies_parsed_at":"2024-10-18T08:44:45.836Z","dependency_job_id":null,"html_url":"https://github.com/AmazingMonster/macaron","commit_stats":null,"previous_names":["amazingmonster/macaron"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmazingMonster%2Fmacaron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmazingMonster%2Fmacaron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmazingMonster%2Fmacaron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AmazingMonster%2Fmacaron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AmazingMonster","download_url":"https://codeload.github.com/AmazingMonster/macaron/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248560069,"owners_count":21124589,"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":["cpp","macros","metaprogramming"],"created_at":"2024-12-23T00:16:49.804Z","updated_at":"2025-04-12T11:33:09.147Z","avatar_url":"https://github.com/AmazingMonster.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Macaron\n\nA C++ preprocessor library for metaprogramming testing.\n\n## Prologue\n\nThis library started as a collection of boilerplates wrapped around static_assert. It was used when I was working on a metaprogramming library named [Conceptrodon](https://github.com/AmazingMonster/conceptrodon).  \n\nAs Conceptrodon grows more complicated, the sheer amount of boilerplates is both bothersome and error-prone.\nOften, a typo during testing could hide itself in plain sight as I frustratedly debugged through the production code. Eventually, I made this library.  \n\nThe goal of Macaron is to simplify numerous static_asserts and provide a convenient way to generate tokens. A macro call can create a list of tokens of any amount below 320.\nThis allows me to test metafunction performance on a large scale.  \n\nMacaron consists of two sections:\n\n- **Judgmental**: wrap `static_assert` boilerplates into function-like macros.\n- **Fragmental**: list a large number of macros following specific patterns for sequential token generation.\n\n## [Documentation](./DOCS.md)\n\n## Install\n\nMacaron is a header-only library. After downloading the code, move the directory *./macaron* to your project, then use it like your own headers.\n\nYou can also install Macaron using CMake:\n\n### Windows\n\n1. Download the library.\n\n2. Open Developer Command Prompt that comes with Visual Studio. Redirect to the library folder. Generate a project buildsystem using CMake:\n\n    ```Shell\n    cmake -S . -B \"Where to build\"\n    ```\n\n3. Redirect to the build directory you specified after `-B` earlier. Run command:\n\n    ```Shell\n    cmake --install . --prefix \"Where to install\"\n    ```\n\nAfter installation, add the install directory you specified after `--prefix` to variable `CMAKE_PREFIX_PATH` in your project's *CMakeCache.txt*. If the variable doesn't exist, you will need to add the following line to your *CMakeCache.txt*:\n\n```CMake\nCMAKE_PREFIX_PATH:PATH=Install directory of the library\n```\n\nIf `CMAKE_PREFIX_PATH` already exists,\nappend the install directory to the values of the variable(note the added semicolon):\n\n```CMake\nCMAKE_PREFIX_PATH:PATH=...; Install directory of the library\n```\n\nIn the *CMakeList.txt* of your project, Add:\n\n```CMake\nfind_package(Macaron REQUIRED CONFIG)\ntarget_link_libraries(YourProject PRIVATE Macaron::Facilities)\n```\n\nYou are good to go.\n\n## References\n\nI learned a lot from [CallableTraits](https://github.com/boostorg/callable_traits/tree/2a56a3a2496cdb66496f844db55085dd992d5e49) by [Barrett Adai](https://github.com/badair) and [Cloak](https://github.com/pfultz2/Cloak/wiki/C-Preprocessor-tricks,-tips,-and-idioms#deferred-expression) by [Paul Fultz II](https://github.com/pfultz2). I am appreciative of their willingness to share knowledge freely.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famazingmonster%2Fmacaron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famazingmonster%2Fmacaron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famazingmonster%2Fmacaron/lists"}