{"id":26123625,"url":"https://github.com/fabienpean/comcept","last_synced_at":"2026-05-30T04:31:21.906Z","repository":{"id":281514727,"uuid":"740700539","full_name":"FabienPean/comcept","owner":"FabienPean","description":"Small library for composable concepts in C++20 and beyond","archived":false,"fork":false,"pushed_at":"2025-11-23T21:20:59.000Z","size":88,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-25T17:09:32.790Z","etag":null,"topics":["composable-concepts","concepts","cpp","cpp20"],"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/FabienPean.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-01-08T22:09:38.000Z","updated_at":"2025-11-23T21:21:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"6425e41f-561e-4f2a-b55d-82cfefa36afb","html_url":"https://github.com/FabienPean/comcept","commit_stats":null,"previous_names":["fabienpean/comcept"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/FabienPean/comcept","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FabienPean%2Fcomcept","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FabienPean%2Fcomcept/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FabienPean%2Fcomcept/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FabienPean%2Fcomcept/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FabienPean","download_url":"https://codeload.github.com/FabienPean/comcept/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FabienPean%2Fcomcept/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33680522,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"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":["composable-concepts","concepts","cpp","cpp20"],"created_at":"2025-03-10T15:53:48.389Z","updated_at":"2026-05-30T04:31:21.900Z","avatar_url":"https://github.com/FabienPean.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Comcept [\u003cimg align=\"right\" src=\"https://github.com/codespaces/badge.svg\"\u003e](https://codespaces.new/FabienPean/comcept?quickstart=1)\n\n![Linux](https://github.com/FabienPean/comcept/actions/workflows/linux.yml/badge.svg)\n![Windows](https://github.com/FabienPean/comcept/actions/workflows/windows.yml/badge.svg)\n\nNo this is not a typo :smile: it is the contraction of _Composable Concepts_. After using C++20 and concepts for a while, have you ever wondered _\"Dang, I really wish I could constrain the element type of this range\"_, then you are at the right place ! This library reformulates concepts and type traits into a unified type trait interface that can be used to build higher-order concepts. Do not expect blazing compilation time, as the goal was a _pleasant_ interface. Currently, it has only a few of them, but their number is destined to increase, where it makes sense _and where it is possible_.\n\n## Usage\n\n```cpp\n#include \u003ccomcept/comcept.hpp\u003e\n#include \u003ccomcept/trait/concepts.hpp\u003e\n\nnamespace ccpt = ::comcept;\nnamespace  trt = ::comcept::trait;\n// A\nauto foo(ccpt::range_of\u003ctrt::integral\u003e auto\u0026\u0026 R)\n{\n    std::print(\"foo(range_of\u003cintegral\u003e)\\n\");\n    for(auto\u0026\u0026 e : R)\n        std::print(\"{}\\n\",e)\n}\n// B\nauto foo(ccpt::range_of\u003ctrt::floating_point\u003e auto\u0026\u0026 R)\n{\n    std::print(\"foo(range_of\u003cfloating_point\u003e)\\n\");\n    for(auto\u0026\u0026 e : R)\n        std::print(\"{}\\n\",e)\n}\n// C\nauto foo(ccpt::range_of\u003ctrt::range_of\u003ctrt::integral\u003e\u003e auto\u0026\u0026 R)\n{\n    std::print(\"foo(range_of\u003crange_of\u003cintegral\u003e\u003e)\\n\");\n    for(auto\u0026\u0026 e : R)\n        foo(e);\n}\n\nint main()\n{\n    foo(std::array{1UL,2UL,3UL});   // calls A\n    foo(std::array{1.,2.,3.});      // calls B\n    foo(std::array{std::array{11UL,12UL,13UL},\n                   std::array{14UL,15UL,16UL}}\n    ); // calls C\n    return 0;\n}\n```\n\n## Installation\n\nThe library is header-only and the content of include folder simply needs to be added on the include directory path of the compiler with the `-I` argument. Alternatively, this repository is CMake ready and provides a target name `comcept::comcept` to link your project to, via `add_subdirectory`, or `FetchContent`: \n\n```cmake\nFetchContent_Declare(\n  comcept\n  GIT_REPOSITORY https://github.com/FabienPean/comcept.git\n  GIT_TAG        main\n  SYSTEM\n  FIND_PACKAGE_ARGS # FIND_PACKAGE_ARGS can also be given with nothing after it, which indicates that find_package() can still be called if FETCHCONTENT_TRY_FIND_PACKAGE_MODE is set to OPT_IN, or is not set.\n)\nFetchContent_MakeAvailable(comcept)\n```\n\nand then linked to your target afterwards as such\n\n```cmake\nadd_executable(main main.cpp)\ntarget_link_libraries(main comcept::comcept)\n```\n\n## License\n\nCopyright (c) 2025 Fabien Péan\n\nThis library is released under the [MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabienpean%2Fcomcept","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabienpean%2Fcomcept","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabienpean%2Fcomcept/lists"}