Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .beman-tidy.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

ignored_paths:
- installtest/
- .build/
- .cache/
- .venv/
- infra/
- papers/
- include/beman/optional/detail/stl_interfaces/
2 changes: 2 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
Expand Down Expand Up @@ -64,7 +66,7 @@ jobs:
egress-policy: audit

- name: Checkout repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/doxygen-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

name: Doxygen GitHub Pages Deploy Action

on:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/ossf-scorecard-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

name: Scorecard analysis workflow
on:
push:
Expand Down Expand Up @@ -27,7 +29,7 @@ jobs:
egress-policy: audit

- name: "Checkout code"
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pre-commit-check.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

name: Lint Check (pre-commit)

on:
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

name: pre-commit

on:
Expand All @@ -24,10 +26,10 @@ jobs:
egress-policy: audit

- name: Checkout repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0

- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: 3.13

Expand Down Expand Up @@ -55,7 +57,7 @@ jobs:
egress-policy: audit

- name: Checkout repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0

# pull_request_target checkout the base of the repo
# We need to checkout the actual pr to lint the changes.
Expand All @@ -65,7 +67,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: 3.13

Expand All @@ -81,7 +83,7 @@ jobs:

# Review dog posts the suggested change from pre-commit to the pr.
- name: suggester / pre-commit
uses: reviewdog/action-suggester@aa38384ceb608d00f84b4690cacc83a5aba307ff #v1.24.0
uses: reviewdog/action-suggester@2558ba17e65a9039e73764a73009fc05fef28a46 #v1.24.3
if: ${{ failure() && steps.run-pre-commit.conclusion == 'failure' }}
with:
tool_name: pre-commit
Expand Down
2 changes: 2 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

# MD033/no-inline-html : Inline HTML : https://github.com/DavidAnson/markdownlint/blob/v0.35.0/doc/md033.md
# Disable inline html linter is needed for <details> <summary>
MD033: false
Expand Down
2 changes: 2 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ set(CMAKE_VERIFY_INTERFACE_HEADER_SETS ON)

# Create the library target and named header set for beman.optional
add_library(beman.optional INTERFACE)
add_library(beman::optional ALIAS beman.optional)
target_sources(
beman.optional
PUBLIC FILE_SET beman_optional_headers TYPE HEADERS BASE_DIRS include
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ SPDX-License-Identifier: 2.0 license with LLVM exceptions
-->

<!-- markdownlint-disable -->
![Library Status](https://raw.githubusercontent.com/bemanproject/beman/refs/heads/main/images/badges/beman_badge-beman_library_production_ready_api_may_undergo_changes.svg)![Standard Target](https://github.com/bemanproject/beman/blob/main/images/badges/cpp26.svg)[![Compiler Explorer Example](https://img.shields.io/badge/Try%20it%20on%20Compiler%20Explorer-grey?logo=compilerexplorer&logoColor=67c52a)](https://godbolt.org/z/Gc6Y9j6zf)
[![Library Status](https://raw.githubusercontent.com/bemanproject/beman/refs/heads/main/images/badges/beman_badge-beman_library_production_ready_api_may_undergo_changes.svg)](https://github.com/bemanproject/beman/blob/main/docs/beman_library_maturity_model.md#the-beman-library-maturity-model)![Standard Target](https://github.com/bemanproject/beman/blob/main/images/badges/cpp26.svg)[![Compiler Explorer Example](https://img.shields.io/badge/Try%20it%20on%20Compiler%20Explorer-grey?logo=compilerexplorer&logoColor=67c52a)](https://godbolt.org/z/Gc6Y9j6zf)
<!-- markdownlint-enable -->

This repository implements `std::optional` extensions targeting C++26. The `beman.optional` library aims to evaluate the stability, the usability, and the performance of these proposed changes before they are officially adopted by WG21 into the C++ Working Draft. Additionally, it allows developers to use these new features before they are implemented in major standard library compilers.
Expand Down
3 changes: 3 additions & 0 deletions cmake/use-fetch-content.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# cmake/use-fetch-content.cmake -*-cmake-*-
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

cmake_minimum_required(VERSION 3.24)

if(NOT BEMAN_OPTIONAL_LOCKFILE)
Expand Down
2 changes: 2 additions & 0 deletions docs/mrdocs.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

# $schema: https://mrdocs.com/docs/mrdocs/develop/_attachments/mrdocs.schema.json
# yaml-language-server: $schema=https://mrdocs.com/docs/mrdocs/develop/_attachments/mrdocs.schema.json

Expand Down
5 changes: 5 additions & 0 deletions etc/ci-clang-toolchain.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# cmake-format: off
# etc/ci-clang-toolchain.cmake -*-cmake-*-
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# cmake-format: on

include_guard(GLOBAL)

set(CMAKE_C_COMPILER clang)
Expand Down
5 changes: 5 additions & 0 deletions etc/clang-16-toolchain.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# cmake-format: off
# etc/clang-16-toolchain.cmake -*-cmake-*-
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# cmake-format: on

include_guard(GLOBAL)

set(CMAKE_C_COMPILER clang-16)
Expand Down
5 changes: 5 additions & 0 deletions etc/clang-17-toolchain.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# cmake-format: off
# etc/clang-17-toolchain.cmake -*-cmake-*-
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# cmake-format: on

include_guard(GLOBAL)

set(CMAKE_C_COMPILER clang-17)
Expand Down
5 changes: 5 additions & 0 deletions etc/clang-18-toolchain.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# cmake-format: off
# etc/clang-18-toolchain.cmake -*-cmake-*-
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# cmake-format: on

include_guard(GLOBAL)

set(CMAKE_C_COMPILER clang-18)
Expand Down
5 changes: 5 additions & 0 deletions etc/clang-19-toolchain.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# cmake-format: off
# etc/clang-19-toolchain.cmake -*-cmake-*-
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# cmake-format: on

include_guard(GLOBAL)

set(CMAKE_C_COMPILER clang-19)
Expand Down
5 changes: 5 additions & 0 deletions etc/clang-flags.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# cmake-format: off
# etc/clang-flags.cmake -*-cmake-*-
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# cmake-format: on

include_guard(GLOBAL)

set(CMAKE_CXX_STANDARD 20)
Expand Down
5 changes: 5 additions & 0 deletions etc/gcc-12-toolchain.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# cmake-format: off
# etc/gcc-12-toolchain.cmake -*-cmake-*-
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# cmake-format: on

include_guard(GLOBAL)

include("${CMAKE_CURRENT_LIST_DIR}/gcc-flags.cmake")
Expand Down
5 changes: 5 additions & 0 deletions etc/gcc-13-toolchain.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# cmake-format: off
# etc/gcc-13-toolchain.cmake -*-cmake-*-
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# cmake-format: on

include_guard(GLOBAL)

include("${CMAKE_CURRENT_LIST_DIR}/gcc-flags.cmake")
Expand Down
5 changes: 5 additions & 0 deletions etc/gcc-14-toolchain.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# cmake-format: off
# etc/gcc-14-toolchain.cmake -*-cmake-*-
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# cmake-format: on

include_guard(GLOBAL)

include("${CMAKE_CURRENT_LIST_DIR}/gcc-flags.cmake")
Expand Down
5 changes: 5 additions & 0 deletions etc/gcc-15-toolchain.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# cmake-format: off
# etc/gcc-15-toolchain.cmake -*-cmake-*-
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# cmake-format: on

include_guard(GLOBAL)

include("${CMAKE_CURRENT_LIST_DIR}/gcc-flags.cmake")
Expand Down
5 changes: 5 additions & 0 deletions etc/gcc-16-toolchain.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# cmake-format: off
# etc/gcc-16-toolchain.cmake -*-cmake-*-
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# cmake-format: on

include_guard(GLOBAL)

include("${CMAKE_CURRENT_LIST_DIR}/gcc-flags.cmake")
Expand Down
5 changes: 5 additions & 0 deletions etc/gcc-flags.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# cmake-format: off
# etc/gcc-flags.cmake -*-cmake-*-
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# cmake-format: on

include_guard(GLOBAL)

set(CMAKE_CXX_STANDARD 20)
Expand Down
5 changes: 5 additions & 0 deletions etc/gcc-toolchain.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# cmake-format: off
# etc/gcc-toolchain.cmake -*-cmake-*-
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# cmake-format: on

include_guard(GLOBAL)

set(CMAKE_C_COMPILER gcc)
Expand Down
5 changes: 5 additions & 0 deletions etc/llvm-16-toolchain.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# cmake-format: off
# etc/llvm-16-toolchain.cmake -*-cmake-*-
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# cmake-format: on

include_guard(GLOBAL)

set(CMAKE_C_COMPILER clang-16)
Expand Down
5 changes: 5 additions & 0 deletions etc/llvm-master-toolchain.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# cmake-format: off
# etc/llvm-master-toolchain.cmake -*-cmake-*-
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# cmake-format: on

set(LLVM_ROOT "$ENV{LLVM_ROOT}" CACHE PATH "Path to LLVM installation")

set(CMAKE_C_COMPILER ${LLVM_ROOT}/bin/clang)
Expand Down
5 changes: 5 additions & 0 deletions etc/llvm-toolchain.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# cmake-format: off
# etc/llvm-toolchain.cmake -*-cmake-*-
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# cmake-format: on

include_guard(GLOBAL)

set(CMAKE_C_COMPILER clang-14)
Expand Down
5 changes: 5 additions & 0 deletions etc/toolchain.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# cmake-format: off
# etc/toolchain.cmake -*-cmake-*-
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# cmake-format: on

include_guard(GLOBAL)

include("${CMAKE_CURRENT_LIST_DIR}/gcc-flags.cmake")
Expand Down
2 changes: 2 additions & 0 deletions scripts/install_run_precommit.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/usr/bin/env bash
# scripts/install_run_precommit.sh -*-shell-*-
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# shellcheck disable=SC1091

python3 -m venv .venv
Expand Down
2 changes: 1 addition & 1 deletion tests/beman/optional/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ target_link_libraries(
PRIVATE beman.optional GTest::gtest GTest::gtest_main
)

add_library(constructor_fails test_constructor_fail.cpp)
add_library(constructor_fails test_constructor_fail.test.cpp)

target_link_libraries(constructor_fails PRIVATE beman.optional)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// tests/beman/optional/detail/iterator.t.cpp -*-C++-*-
// tests/beman/optional/detail/iterator.test.cpp -*-C++-*-
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

/**
Expand Down
Loading