Skip to content
Merged
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: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -13,14 +13,14 @@ repos:
# This brings in a portable version of clang-format.
# See also: https://github.com/ssciwr/clang-format-wheel
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v18.1.8
rev: v21.1.2
hooks:
- id: clang-format
types_or: [c++, c]

# CMake linting and formatting
- repo: https://github.com/BlankSpruce/gersemi
rev: 0.17.0
rev: 0.22.3
hooks:
- id: gersemi
name: CMake linting
Expand All @@ -36,7 +36,7 @@ repos:

# Config file: .codespell_ignore
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
rev: v2.4.1
hooks:
- id: codespell
args: ['-I', '.codespell_ignore', '--uri-ignore-words-list', '*']
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ if(OPTIONAL_ENABLE_TESTING)
beman_optional_test
PRIVATE
FILE_SET beman_optional_test_headers
TYPE HEADERS
BASE_DIRS tests
TYPE HEADERS
BASE_DIRS tests
)
# Tests
add_subdirectory(tests/beman/optional)
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ papers:
.DEFAULT: $(_build_path)/CMakeCache.txt ## Other targets passed through to cmake
cmake --build $(_build_path) --config $(CONFIG) --target $@ -- -k 0

PYEXECPATH ?= $(shell which python3.12 || which python3.11 || which python3.10 || which python3.9 || which python3.8 || which python3.7 || which python3)
PYEXECPATH ?= $(shell which python3.13 || which python3.12 || which python3.11 || which python3.10 || which python3.9 || which python3.8 || which python3)
PYTHON ?= $(notdir $(PYEXECPATH))
VENV := .venv
ACTIVATE := . $(VENV)/bin/activate &&
Expand Down
9 changes: 3 additions & 6 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,8 @@ foreach(example ${EXAMPLES})

# Install .
install(
TARGETS
${example}
COMPONENT
beman_optional_examples
DESTINATION
${CMAKE_INSTALL_BINDIR}
TARGETS ${example}
COMPONENT beman_optional_examples
DESTINATION ${CMAKE_INSTALL_BINDIR}
)
endforeach()
17 changes: 8 additions & 9 deletions include/beman/optional/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ target_sources(
beman_optional
PUBLIC
FILE_SET beman_optional_headers
TYPE HEADERS
FILES
optional.hpp
detail/iterator.hpp
detail/stl_interfaces/config.hpp
detail/stl_interfaces/fwd.hpp
detail/stl_interfaces/iterator_interface.hpp
TYPE HEADERS
FILES
optional.hpp
detail/iterator.hpp
detail/stl_interfaces/config.hpp
detail/stl_interfaces/fwd.hpp
detail/stl_interfaces/iterator_interface.hpp
)

install(
Expand All @@ -24,8 +24,7 @@ install(
install(
TARGETS beman_optional
EXPORT beman_optional_export
DESTINATION
${CMAKE_INSTALL_LIBDIR}
DESTINATION ${CMAKE_INSTALL_LIBDIR}
FILE_SET beman_optional_headers
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
COMPONENT beman_optional_development
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ BEMAN_OPTIONAL_DETAIL_STL_INTERFACES_NAMESPACE_V1 {
template <typename D = Derived>
constexpr auto operator->() const
noexcept(noexcept(detail::make_pointer<pointer, reference>(*std::declval<const D&>())))
-> decltype(detail::make_pointer<pointer, reference>(*std::declval<const D&>())) {
-> decltype(detail::make_pointer<pointer, reference>(*std::declval<const D&>())) {
return detail::make_pointer<pointer, reference>(*derived());
}

Expand Down
4 changes: 2 additions & 2 deletions papers/P2988/optional_ref.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ class optional<T&> {
}

template <class F>
constexpr auto
transform(F&& f) const -> optional<std::invoke_result_t<F, T&>> {
constexpr auto transform(F&& f) const
-> optional<std::invoke_result_t<F, T&>> {
using U = std::invoke_result_t<F, T&>;
return (has_value())
? optional<U>{std::invoke(std::forward<F>(f), *value_)}
Expand Down
4 changes: 2 additions & 2 deletions tests/beman/optional/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ target_sources(
beman_optional_test
PRIVATE
FILE_SET beman_optional_test_headers
TYPE HEADERS
FILES test_types.hpp test_utilities.hpp
TYPE HEADERS
FILES test_types.hpp test_utilities.hpp
)

target_link_libraries(
Expand Down