From 5d5eef09191c5b32077884479c8808af4e19d320 Mon Sep 17 00:00:00 2001 From: Jeff Garland Date: Mon, 30 Jun 2025 18:32:21 -0700 Subject: [PATCH 1/4] cleanup readme -- add link to paper -- add cpp26 badge --- README.md | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index c231155..a77d31b 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,24 @@ -# beman.copyable_function: A Beman Library Implementation of copyable_function (P2548) +# beman.copyable\_function: A Beman Library Implementation of copyable_function ([P2548](https://wg21.link/P2548)) -![Library Status](https://raw.githubusercontent.com/bemanproject/beman/refs/heads/main/images/badges/beman_badge-beman_library_under_development.svg) ![Continuous Integration Tests](https://github.com/bemanproject/exemplar/actions/workflows/ci_tests.yml/badge.svg) ![Lint Check (pre-commit)](https://github.com/bemanproject/exemplar/actions/workflows/pre-commit.yml/badge.svg) +![Library Status](https://raw.githubusercontent.com/bemanproject/beman/refs/heads/main/images/badges/beman_badge-beman_library_under_development.svg) +![Continuous Integration Tests](https://github.com/bemanproject/exemplar/actions/workflows/ci_tests.yml/badge.svg) ![Lint Check (pre-commit)](https://github.com/bemanproject/exemplar/actions/workflows/pre-commit.yml/badge.svg) +![Target Standard](https://github.com/bemanproject/beman/blob/main/images/badges/cpp26.svg) -`beman.copyable_function` is a minimal C++ library conforming to [The Beman Standard](https://github.com/bemanproject/beman/blob/main/docs/BEMAN_STANDARD.md). -This can be used as a template for those intending to write Beman libraries. -It may also find use as a minimal and modern C++ project structure. + +`beman.copyable_function` is a type-erased function wrapper that can represent any copyable callable matching +the function signature R(Args...). The library conforms to the [The Beman Standard](https://github.com/bemanproject/beman/blob/main/docs/BEMAN_STANDARD.md). **Status**: [Under development and not yet ready for production use.](https://github.com/bemanproject/beman/blob/main/docs/BEMAN_LIBRARY_MATURITY_MODEL.md#under-development-and-not-yet-ready-for-production-use) ## Usage -`std::copyable_function` is a type-erased function wrapper -that can represent any copyable callable matching -the function signature R(Args...) - -### Usage: default projection in constrained algorithms -The following code snippet illustrates how we can achieve a default projection using `beman::exemplar::identity`: +The following code snippet illustrates `copyable_function`: ```cpp #include @@ -61,9 +58,8 @@ You can disable this behavior by setting cmake option [`BEMAN_EXEMPLAR_BUILD_TESTS`](#beman_exemplar_build_tests) to `OFF` when configuring the project. -However, -some examples and tests will not be compiled -unless provided compiler support **C++20** or ranges capabilities enabled. +However, some examples and tests will not be compiled +unless provided compiler support **C++20** or ranges capabilities enabled. <-- TODO there are no examples > [!TIP] > From e8b0aa00cdda8334620329ef04ce3a728dcaf203 Mon Sep 17 00:00:00 2001 From: Jeff Garland Date: Mon, 30 Jun 2025 18:40:35 -0700 Subject: [PATCH 2/4] adopt recent attributes fix for code percentages --- .gitattributes | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..c561e8d --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +infra/** linguist-vendored + From 9b6115b2474707b92557be197f37c80d7c0b43ee Mon Sep 17 00:00:00 2001 From: Jeff Garland Date: Tue, 1 Jul 2025 09:16:16 -0700 Subject: [PATCH 3/4] Update .gitattributes Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .gitattributes | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index c561e8d..2c34f89 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1 @@ infra/** linguist-vendored - From ba1150a6435f4b8e22467fdbe4675099104ac138 Mon Sep 17 00:00:00 2001 From: Jeff Garland Date: Tue, 1 Jul 2025 19:41:57 -0700 Subject: [PATCH 4/4] remove incorrect ranges and example link text --- README.md | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index a77d31b..d0ae3b7 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,11 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception --> - + ![Library Status](https://raw.githubusercontent.com/bemanproject/beman/refs/heads/main/images/badges/beman_badge-beman_library_under_development.svg) ![Continuous Integration Tests](https://github.com/bemanproject/exemplar/actions/workflows/ci_tests.yml/badge.svg) ![Lint Check (pre-commit)](https://github.com/bemanproject/exemplar/actions/workflows/pre-commit.yml/badge.svg) ![Target Standard](https://github.com/bemanproject/beman/blob/main/images/badges/cpp26.svg) + `beman.copyable_function` is a type-erased function wrapper that can represent any copyable callable matching @@ -40,7 +41,6 @@ int main() ``` -Full runnable examples can be found in [`examples/`](examples/). ## Dependencies @@ -58,25 +58,6 @@ You can disable this behavior by setting cmake option [`BEMAN_EXEMPLAR_BUILD_TESTS`](#beman_exemplar_build_tests) to `OFF` when configuring the project. -However, some examples and tests will not be compiled -unless provided compiler support **C++20** or ranges capabilities enabled. <-- TODO there are no examples - -> [!TIP] -> -> In the logs you will be able to see if there are any examples that aren't enabled -> due to compiler capabilities or the configured C++ version. -> -> Below is an example: -> -> ```txt -> -- Looking for __cpp_lib_ranges -> -- Looking for __cpp_lib_ranges - not found -> CMake Warning at examples/CMakeLists.txt:12 (message): -> Missing range support! Skip: identity_as_default_projection -> -> -> Examples to be built: identity_direct_usage -> ``` ### Supported Platforms