diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dda28139..d0785b67 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 @@ -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 @@ -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', '*'] diff --git a/CMakeLists.txt b/CMakeLists.txt index d07afc41..3e355ee4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/Makefile b/Makefile index 33a3d266..e052e756 100755 --- a/Makefile +++ b/Makefile @@ -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 && diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 8650adb6..801b83f6 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -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() diff --git a/include/beman/optional/CMakeLists.txt b/include/beman/optional/CMakeLists.txt index 57c70210..67dd817f 100644 --- a/include/beman/optional/CMakeLists.txt +++ b/include/beman/optional/CMakeLists.txt @@ -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( @@ -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 diff --git a/include/beman/optional/detail/stl_interfaces/iterator_interface.hpp b/include/beman/optional/detail/stl_interfaces/iterator_interface.hpp index 5d439d2a..8a0c0f80 100644 --- a/include/beman/optional/detail/stl_interfaces/iterator_interface.hpp +++ b/include/beman/optional/detail/stl_interfaces/iterator_interface.hpp @@ -229,7 +229,7 @@ BEMAN_OPTIONAL_DETAIL_STL_INTERFACES_NAMESPACE_V1 { template constexpr auto operator->() const noexcept(noexcept(detail::make_pointer(*std::declval()))) - -> decltype(detail::make_pointer(*std::declval())) { + -> decltype(detail::make_pointer(*std::declval())) { return detail::make_pointer(*derived()); } diff --git a/papers/P2988/optional_ref.h b/papers/P2988/optional_ref.h index 877d4189..0acb1934 100644 --- a/papers/P2988/optional_ref.h +++ b/papers/P2988/optional_ref.h @@ -132,8 +132,8 @@ class optional { } template - constexpr auto - transform(F&& f) const -> optional> { + constexpr auto transform(F&& f) const + -> optional> { using U = std::invoke_result_t; return (has_value()) ? optional{std::invoke(std::forward(f), *value_)} diff --git a/tests/beman/optional/CMakeLists.txt b/tests/beman/optional/CMakeLists.txt index b3301478..71d4b5e8 100644 --- a/tests/beman/optional/CMakeLists.txt +++ b/tests/beman/optional/CMakeLists.txt @@ -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(