{"id":18448890,"url":"https://github.com/coding-pelican/macrometa","last_synced_at":"2025-11-09T11:02:56.810Z","repository":{"id":199441373,"uuid":"702894587","full_name":"coding-pelican/macrometa","owner":"coding-pelican","description":"Macrometa: Macro Metaprogramming (MCMT) Library for C","archived":false,"fork":false,"pushed_at":"2023-10-14T08:28:01.000Z","size":1314,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-16T01:51:43.957Z","etag":null,"topics":["c","c11","header-only","language","macros","metaprogramming","preprocessor","programming-language","recursion","turing-tarpit"],"latest_commit_sha":null,"homepage":"","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/coding-pelican.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-10-10T08:04:22.000Z","updated_at":"2023-10-13T18:47:44.000Z","dependencies_parsed_at":"2023-10-15T03:41:23.958Z","dependency_job_id":"2bce256b-9605-4455-aed9-77c8df240ebb","html_url":"https://github.com/coding-pelican/macrometa","commit_stats":null,"previous_names":["coding-pelican/macrometa"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/coding-pelican/macrometa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coding-pelican%2Fmacrometa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coding-pelican%2Fmacrometa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coding-pelican%2Fmacrometa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coding-pelican%2Fmacrometa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coding-pelican","download_url":"https://codeload.github.com/coding-pelican/macrometa/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coding-pelican%2Fmacrometa/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":283496071,"owners_count":26845317,"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-11-09T02:00:05.828Z","response_time":62,"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":["c","c11","header-only","language","macros","metaprogramming","preprocessor","programming-language","recursion","turing-tarpit"],"created_at":"2024-11-06T07:17:34.914Z","updated_at":"2025-11-09T11:02:56.683Z","avatar_url":"https://github.com/coding-pelican.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Macrometa: Macro Metaprogramming (MCMT) Library for C\n\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n\n## Overview\n\nMacrometa (MCMT) is a powerful macro-based library for C that enables metaprogramming, allowing developers to generate complex code during compile-time using preprocessor macros. It is inspired by the article \"C/C++ Preprocessor Metaprogramming\" by Saad Ahmad and various C preprocessor tricks, tips, and idioms.\n\n### Key Features\n\n- **Metaprogramming Tools**: MCMT provides a wide range of macros for handling empty arguments, manipulating identifiers, concatenating macros, overloading macros, and more.\n\n- **Based on C11 Standard**: MCMT is based on the C11 standard, ensuring compatibility with modern C compilers.\n\n## Library Sections\n\nThe MCMT Library is organized into several sections, each dedicated to specific macro functionalities:\n\n- **mcmt_basic**: Basic macros for handling empty arguments and expansions.\n- **mcmt_concat**: Macros for concatenating and manipulating identifiers.\n- **mcmt_cat**: Macros for complex identifier concatenation and deferring macro calls.\n- **mcmt_extn_impl_ovld**: Macros for extending, implementing, and overloading generic macros.\n- **mcmt_arg**: Macros for manipulating and counting arguments.\n- **mcmt_bit_logic**: Macros for bitwise logic operations.\n- **mcmt_logic**: Macros for boolean and logical operations.\n- **mcmt_list**: Macros for handling lists and checking for emptiness.\n- **mcmt_tuple**: Macros for working with tuples and enclosed expressions.\n- **mcmt_for_each**: Macros for iterating through lists and applying operations.\n- **mcmt_compare**: Macros for comparing and checking the existence of macro arguments.\n- **mcmt_arith**: Macros for basic arithmetic operations.\n- **mcmt_range**: Macros for generating ranges of values.\n\n## Getting Started\n\nTo use the MCMT Library in your project, include the `mcmt.h` header file and start leveraging the macros provided by the library. Here's a very simple example:\n\n```c\n#include \"macrometa.h\"\n#include \u003cstdio.h\u003e\n\n// Define a macro to square a number.\n#define SQUARE(x) MUL(x, x)\n\nint main() {\n    int result = SQUARE(5); // Expands to 25 at compile-time.\n    printf(\"Square: %d\\n\", result);\n    return 0;\n}\n```\n\n## License\n\nThis library is distributed under the [MIT License](LICENSE).\n\n## Contributing\n\nContributions to the MCMT Library are welcome! Feel free to open issues or submit pull requests on the [GitHub repository](https://github.com/coding-pelican/macrometa).\n\n## Author\n\n- **Gyeongtae Kim (DevDasae, @coding-pelican)** - [codingpelican@gmail.com](mailto:codingpelican@gmail.com)\n\nFor more information and updates, visit the [GitHub repository](https://github.com/coding-pelican/macrometa).\n\n---\n*This library is based on the C11 standard.*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoding-pelican%2Fmacrometa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoding-pelican%2Fmacrometa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoding-pelican%2Fmacrometa/lists"}