diff --git a/.github/conda_pgm_env.yml b/.github/conda_pgm_env.yml index 4520cd90a..652a7b3b5 100644 --- a/.github/conda_pgm_env.yml +++ b/.github/conda_pgm_env.yml @@ -5,7 +5,7 @@ name: conda-pgm-env dependencies: # build env - - python=3.11 + - python=3.12 - pip - wheel - setuptools diff --git a/.github/workflows/check-code-quality.yml b/.github/workflows/check-code-quality.yml index af2918650..152bb0ff4 100644 --- a/.github/workflows/check-code-quality.yml +++ b/.github/workflows/check-code-quality.yml @@ -29,7 +29,7 @@ concurrency: jobs: check-code-quality: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Checkout @@ -38,7 +38,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: '3.12' - name: Upgrade pip run: pip install --upgrade pip @@ -66,8 +66,8 @@ jobs: - name: Install and run clang-format run: | - sudo apt-get update && sudo apt-get install -y clang-format-15 - find . -regex '.*\.\(h\|c\|cpp\|hpp\|cc\|cxx\)' -exec clang-format-15 -style=file -i {} \; + sudo apt-get update && sudo apt-get install -y clang-format-18 + find . -regex '.*\.\(h\|c\|cpp\|hpp\|cc\|cxx\)' -exec clang-format-18 -style=file -i {} \; - name: If needed raise error run: | diff --git a/.github/workflows/citations.yml b/.github/workflows/citations.yml index ed4afb693..05aee1ffb 100644 --- a/.github/workflows/citations.yml +++ b/.github/workflows/citations.yml @@ -27,9 +27,12 @@ concurrency: jobs: validate-citations: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: checkout uses: actions/checkout@v4 + - name: Install R + run: | + sudo apt-get update && sudo apt-get install -y r-base - name: Validate CITATION.cff uses: dieghernan/cff-validator@v3 diff --git a/.github/workflows/clang-tidy.yml b/.github/workflows/clang-tidy.yml index ce3506df2..66f53e875 100644 --- a/.github/workflows/clang-tidy.yml +++ b/.github/workflows/clang-tidy.yml @@ -44,7 +44,7 @@ concurrency: jobs: clang-tidy: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 strategy: matrix: build-option: [ debug, release ] diff --git a/.github/workflows/dco-merge-group.yml b/.github/workflows/dco-merge-group.yml index 6b4ab946d..434d7fd45 100644 --- a/.github/workflows/dco-merge-group.yml +++ b/.github/workflows/dco-merge-group.yml @@ -14,7 +14,7 @@ on: jobs: dco-merge-group: name: DCO - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: ${{ github.actor != 'dependabot[bot]' }} steps: - name: "Workaround for DCO on merge groups" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8eb508230..d736c4885 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,13 +40,13 @@ jobs: acquire-python-version-build-sdist: name: Build sdist and set version - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: "3.11" + python-version: "3.12" - name: Set PyPI Version run: | @@ -69,7 +69,7 @@ jobs: path: ./wheelhouse/*.tar.gz build-cpp-test-linux: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 strategy: matrix: build-option: [ debug, release ] @@ -87,11 +87,11 @@ jobs: - name: Install packages run: | sudo apt-get update - sudo apt-get install -y ninja-build gcc-12 g++-12 clang-15 - sudo ln -s /usr/bin/clang-15 /usr/local/bin/clang - sudo ln -s /usr/bin/clang++-15 /usr/local/bin/clang++ - sudo ln -s /usr/bin/gcc-12 /usr/local/bin/gcc - sudo ln -s /usr/bin/g++-12 /usr/local/bin/g++ + sudo apt-get install -y ninja-build gcc-13 g++-13 clang-18 + sudo ln -s /usr/bin/clang-18 /usr/local/bin/clang + sudo ln -s /usr/bin/clang++-18 /usr/local/bin/clang++ + sudo ln -s /usr/bin/gcc-13 /usr/local/bin/gcc + sudo ln -s /usr/bin/g++-13 /usr/local/bin/g++ - name: Enable brew run: | @@ -185,10 +185,10 @@ jobs: platform: [ linux-x64, linux-aarch64, macos, windows ] include: - platform: linux-x64 - os: ubuntu-latest + os: ubuntu-24.04 cibw_build: "*_x86_64" - platform: linux-aarch64 - os: ubuntu-latest + os: ubuntu-24.04 cibw_build: "*_aarch64" - platform: macos os: macos-14 @@ -209,7 +209,7 @@ jobs: path: . - name: Set up QEMU - if: matrix.os == 'ubuntu-latest' + if: matrix.os == 'ubuntu-24.04' uses: docker/setup-qemu-action@v3 - name: Set up XCode @@ -268,7 +268,7 @@ jobs: needs: [build-cpp-test-linux, build-cpp-test-windows, build-cpp-test-macos, build-and-test-python, build-and-test-conda] # always run publish job but fail at the first step if previous jobs have been failed if: always() - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 permissions: contents: write env: @@ -287,7 +287,7 @@ jobs: - name: Setup python uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: '3.12' architecture: x64 - uses: actions/download-artifact@v4 diff --git a/.github/workflows/reuse-compliance.yml b/.github/workflows/reuse-compliance.yml index a2830340a..8b88c80da 100644 --- a/.github/workflows/reuse-compliance.yml +++ b/.github/workflows/reuse-compliance.yml @@ -24,7 +24,7 @@ concurrency: jobs: reuse-compliance-check: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: checkout uses: actions/checkout@v4 diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index 146fd86df..25c3f46cd 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -22,11 +22,11 @@ jobs: sonar-cloud: if: (github.event_name == 'push') || (!startsWith(github.head_ref, 'release')) name: SonarCloud - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 env: BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed CMAKE_PREFIX_PATH: /home/linuxbrew/.linuxbrew - LLVM_COV: llvm-cov-15 + LLVM_COV: llvm-cov-18 steps: - uses: actions/checkout@v4 with: @@ -34,9 +34,9 @@ jobs: - name: Install packages run: | sudo apt-get update - sudo apt-get install -y ninja-build clang-15 lcov gcovr - sudo ln -s /usr/bin/clang-15 /usr/local/bin/clang - sudo ln -s /usr/bin/clang++-15 /usr/local/bin/clang++ + sudo apt-get install -y ninja-build clang-18 lcov gcovr + sudo ln -s /usr/bin/clang-18 /usr/local/bin/clang + sudo ln -s /usr/bin/clang++-18 /usr/local/bin/clang++ - name: Enable brew run: | echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH @@ -46,7 +46,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: "3.12" - name: Install sonar-scanner and build-wrapper uses: SonarSource/sonarcloud-github-c-cpp@v3 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index eef0d09da..d512e5c18 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -37,7 +37,7 @@ repos: pass_filenames: false always_run: true - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v15.0.7 + rev: v18.1.3 hooks: - id: clang-format types_or: [ c++, c ] diff --git a/docs/advanced_documentation/build-guide.md b/docs/advanced_documentation/build-guide.md index b4d0958d3..b7c94f545 100644 --- a/docs/advanced_documentation/build-guide.md +++ b/docs/advanced_documentation/build-guide.md @@ -46,8 +46,8 @@ You need a C++ compiler with C++20 support. Below is a list of tested compilers: * Version 12.x tested using the musllinux build with custom compiler * Version 13.x tested in CI * Clang >= 15.0 - * Version 15.x tested in CI - * Version 15.x tested in CI with code quality checks + * Version 18.x tested in CI + * Version 18.x tested in CI with code quality checks You can define the environment variable `CXX` to for example `clang++` to specify the C++ compiler. @@ -207,10 +207,10 @@ WSL), or in a physical/virtual machine. Append the following lines into the file `${HOME}/.bashrc`. ```shell -export CXX=clang++-15 # or g++-13 -export CC=clang-15 # gcc-13 +export CXX=clang++-18 # or g++-13 +export CC=clang-18 # gcc-13 export CMAKE_PREFIX_PATH=/home/linuxbrew/.linuxbrew -export LLVM_COV=llvm-cov-15 +export LLVM_COV=llvm-cov-18 export CLANG_TIDY=clang-tidy-15 # only if you want to use one of the clang-tidy presets ``` @@ -220,7 +220,7 @@ Install the following packages from Ubuntu. ```shell sudo apt update && sudo apt -y upgrade -sudo apt install -y wget curl zip unzip tar git build-essential gcovr lcov gcc g++ clang-15 make gdb ninja-build pkg-config python3.10 python3.10-dev python3.10-venv python3-pip +sudo apt install -y wget curl zip unzip tar git build-essential gcovr lcov gcc g++ clang-18 make gdb ninja-build pkg-config python3.10 python3.10-dev python3.10-venv python3-pip ``` ### C++ packages diff --git a/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/meta_data.hpp b/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/meta_data.hpp index 1e7f0c62b..2d30befe2 100644 --- a/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/meta_data.hpp +++ b/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/meta_data.hpp @@ -74,8 +74,8 @@ constexpr void set_nan(Enum& x) { } template requires requires(T t) { - { set_nan(t) }; - } + { set_nan(t) }; + } inline T const nan_value = [] { T v{}; set_nan(v); diff --git a/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/serialization/common.hpp b/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/serialization/common.hpp index ae848d2a7..6910d818f 100644 --- a/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/serialization/common.hpp +++ b/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/serialization/common.hpp @@ -30,8 +30,8 @@ template constexpr bool is_columnar_v = std::derived // The attribute buffers are copies of the associated attribute buffers, when provided, and otherwise empty. template requires requires(BufferType const& b) { - { b.attributes } -> std::convertible_to>>; - } + { b.attributes } -> std::convertible_to>>; + } std::vector> reordered_attribute_buffers(BufferType& buffer, std::span attribute_order) { using Data = typename BufferType::Data; diff --git a/power_grid_model_c/power_grid_model/include/power_grid_model/common/grouped_index_vector.hpp b/power_grid_model_c/power_grid_model/include/power_grid_model/common/grouped_index_vector.hpp index 054ec3bee..9d57af445 100644 --- a/power_grid_model_c/power_grid_model/include/power_grid_model/common/grouped_index_vector.hpp +++ b/power_grid_model_c/power_grid_model/include/power_grid_model/common/grouped_index_vector.hpp @@ -61,19 +61,17 @@ inline auto sparse_decode(IdxVector const& indptr) { template concept grouped_index_vector_type = std::default_initializable && requires(T const t, Idx const idx) { - typename T::iterator; + typename T::iterator; - { t.size() } -> std::same_as; + { t.size() } -> std::same_as; - { t.begin() } -> index_range_iterator; - { t.end() } -> index_range_iterator; - { - t.get_element_range(idx) - } -> random_access_iterable_like; + { t.begin() } -> index_range_iterator; + { t.end() } -> index_range_iterator; + { t.get_element_range(idx) } -> random_access_iterable_like; - { t.element_size() } -> std::same_as; - { t.get_group(idx) } -> std::same_as; - }; + { t.element_size() } -> std::same_as; + { t.get_group(idx) } -> std::same_as; +}; } // namespace detail template diff --git a/power_grid_model_c/power_grid_model/include/power_grid_model/common/iterator_like_concepts.hpp b/power_grid_model_c/power_grid_model/include/power_grid_model/common/iterator_like_concepts.hpp index b347c4487..8732f9390 100644 --- a/power_grid_model_c/power_grid_model/include/power_grid_model/common/iterator_like_concepts.hpp +++ b/power_grid_model_c/power_grid_model/include/power_grid_model/common/iterator_like_concepts.hpp @@ -11,41 +11,40 @@ namespace power_grid_model { template concept iterator_like = requires(T const t) { - { *t } -> std::convertible_to const&>; - }; + { *t } -> std::convertible_to const&>; +}; template concept forward_iterator_like = std::regular && iterator_like && requires(T t) { - { t++ } -> std::same_as; - { ++t } -> std::same_as; - }; + { t++ } -> std::same_as; + { ++t } -> std::same_as; +}; template concept bidirectional_iterator_like = forward_iterator_like && requires(T t) { - { t-- } -> std::same_as; - { --t } -> std::same_as; - }; + { t-- } -> std::same_as; + { --t } -> std::same_as; +}; template concept random_access_iterator_like = bidirectional_iterator_like && std::totally_ordered && requires(T t, Idx n) { - { t + n } -> std::same_as; - { t - n } -> std::same_as; - { t += n } -> std::same_as; - { t -= n } -> std::same_as; - }; + { t + n } -> std::same_as; + { t - n } -> std::same_as; + { t += n } -> std::same_as; + { t -= n } -> std::same_as; + }; template concept random_access_iterable_like = requires(T const t) { - { t.begin() } -> random_access_iterator_like; - { t.end() } -> random_access_iterator_like; - }; + { t.begin() } -> random_access_iterator_like; + { t.end() } -> random_access_iterator_like; +}; template -concept index_range_iterator = - random_access_iterator_like && requires(T const t) { - typename T::iterator; - { *t } -> random_access_iterable_like; - }; +concept index_range_iterator = random_access_iterator_like && requires(T const t) { + typename T::iterator; + { *t } -> random_access_iterable_like; +}; } // namespace power_grid_model diff --git a/power_grid_model_c/power_grid_model/include/power_grid_model/common/three_phase_tensor.hpp b/power_grid_model_c/power_grid_model/include/power_grid_model/common/three_phase_tensor.hpp index 6b2144b2b..17846e1d3 100644 --- a/power_grid_model_c/power_grid_model/include/power_grid_model/common/three_phase_tensor.hpp +++ b/power_grid_model_c/power_grid_model/include/power_grid_model/common/three_phase_tensor.hpp @@ -125,8 +125,8 @@ static_assert(std::is_trivially_destructible_v>); template concept column_vector = (T::ColsAtCompileTime == 1); template -concept rk2_tensor = (static_cast(T::RowsAtCompileTime) == - static_cast(T::ColsAtCompileTime)); // rank 2 tensor +concept rk2_tensor = + (static_cast(T::RowsAtCompileTime) == static_cast(T::ColsAtCompileTime)); // rank 2 tensor template concept column_vector_or_tensor = column_vector || rk2_tensor; diff --git a/power_grid_model_c/power_grid_model/include/power_grid_model/component/component.hpp b/power_grid_model_c/power_grid_model/include/power_grid_model/component/component.hpp index a07f63524..8bff282b2 100644 --- a/power_grid_model_c/power_grid_model/include/power_grid_model/component/component.hpp +++ b/power_grid_model_c/power_grid_model/include/power_grid_model/component/component.hpp @@ -24,16 +24,16 @@ struct UpdateChange { template concept component_c = requires(T t, T const& ct, typename T::UpdateType u, typename T::UpdateType const& cu) { - typename T::InputType; - typename T::UpdateType; + typename T::InputType; + typename T::UpdateType; - { T::name } -> std::convertible_to; - { ct.math_model_type() } -> std::convertible_to; + { T::name } -> std::convertible_to; + { ct.math_model_type() } -> std::convertible_to; - { ct.id() } -> std::same_as; + { ct.id() } -> std::same_as; - { t.update(cu) } -> std::same_as; - { ct.inverse(u) } -> std::same_as; - }; + { t.update(cu) } -> std::same_as; + { ct.inverse(u) } -> std::same_as; +}; } // namespace power_grid_model diff --git a/power_grid_model_c/power_grid_model/include/power_grid_model/component/shunt.hpp b/power_grid_model_c/power_grid_model/include/power_grid_model/component/shunt.hpp index adff6cd06..08a369d67 100644 --- a/power_grid_model_c/power_grid_model/include/power_grid_model/component/shunt.hpp +++ b/power_grid_model_c/power_grid_model/include/power_grid_model/component/shunt.hpp @@ -77,8 +77,8 @@ class Shunt : public Appliance { DoubleComplex y0_{nan}; template - requires std::same_as || std::same_as bool - update_params(T shunt_params) { + requires std::same_as || std::same_as + bool update_params(T shunt_params) { bool changed = update_param(shunt_params.g1, g1_); changed = update_param(shunt_params.b1, b1_) || changed; changed = update_param(shunt_params.g0, g0_) || changed; diff --git a/power_grid_model_c/power_grid_model/include/power_grid_model/component/transformer_utils.hpp b/power_grid_model_c/power_grid_model/include/power_grid_model/component/transformer_utils.hpp index 491bd4fe7..d7f1a3d86 100644 --- a/power_grid_model_c/power_grid_model/include/power_grid_model/component/transformer_utils.hpp +++ b/power_grid_model_c/power_grid_model/include/power_grid_model/component/transformer_utils.hpp @@ -16,15 +16,15 @@ concept enum_c = std::is_enum_v; template concept transformer_c = component_c && requires(T const& t, typename T::UpdateType u, typename T::SideType s) { - { t.node(s) } -> std::same_as; - { t.status(s) } -> std::convertible_to; - - { t.tap_side() } -> std::same_as; - { t.tap_pos() } -> std::convertible_to; - { t.tap_min() } -> std::convertible_to; - { t.tap_max() } -> std::convertible_to; - { t.tap_nom() } -> std::convertible_to; - }; + { t.node(s) } -> std::same_as; + { t.status(s) } -> std::convertible_to; + + { t.tap_side() } -> std::same_as; + { t.tap_pos() } -> std::convertible_to; + { t.tap_min() } -> std::convertible_to; + { t.tap_max() } -> std::convertible_to; + { t.tap_nom() } -> std::convertible_to; +}; constexpr double tap_adjust_impedance(double tap_pos, double tap_min, double tap_max, double tap_nom, double xk, double xk_min, double xk_max) { diff --git a/power_grid_model_c/power_grid_model/include/power_grid_model/index_mapping.hpp b/power_grid_model_c/power_grid_model/include/power_grid_model/index_mapping.hpp index 16f336173..5d5488a69 100644 --- a/power_grid_model_c/power_grid_model/include/power_grid_model/index_mapping.hpp +++ b/power_grid_model_c/power_grid_model/include/power_grid_model/index_mapping.hpp @@ -58,9 +58,7 @@ inline SparseIndexMapping build_sparse_mapping(IdxVector const& idx_B_in_A, Idx std::vector entries(n_A); std::ranges::transform(idx_B_in_A, boost::counting_range(Idx{0}, static_cast(idx_B_in_A.size())), - entries.begin(), [](Idx j_B, Idx i_A) { - return SparseEntry{i_A, j_B}; - }); + entries.begin(), [](Idx j_B, Idx i_A) { return SparseEntry{i_A, j_B}; }); SparseIndexMapping sparse_mapping; sparse_mapping.indptr.resize(n_B + 1); @@ -97,9 +95,8 @@ inline auto build_dense_mapping_comparison_sort(IdxVector const& idx_B_in_A, Idx std::vector mapping_to_from; mapping_to_from.reserve(idx_B_in_A.size()); std::ranges::transform(idx_B_in_A, boost::counting_range(Idx{0}, static_cast(idx_B_in_A.size())), - std::back_inserter(mapping_to_from), [](Idx value, Idx orig_idx) { - return std::pair{value, orig_idx}; - }); + std::back_inserter(mapping_to_from), + [](Idx value, Idx orig_idx) { return std::pair{value, orig_idx}; }); std::ranges::sort(mapping_to_from); diff --git a/power_grid_model_c/power_grid_model/include/power_grid_model/main_core/math_state.hpp b/power_grid_model_c/power_grid_model/include/power_grid_model/main_core/math_state.hpp index 6d45f4d17..de0419cce 100644 --- a/power_grid_model_c/power_grid_model/include/power_grid_model/main_core/math_state.hpp +++ b/power_grid_model_c/power_grid_model/include/power_grid_model/main_core/math_state.hpp @@ -30,8 +30,7 @@ inline void update_y_bus(MathState& math_state, std::vector> } else { return math_state.y_bus_vec_asym; } - } - (); + }(); assert(y_bus_vec.size() == math_model_params.size()); @@ -49,8 +48,7 @@ inline void update_y_bus(MathState& math_state, std::vector> } else { return math_state.y_bus_vec_asym; } - } - (); + }(); assert(y_bus_vec.size() == math_model_params.size()); diff --git a/power_grid_model_c/power_grid_model/include/power_grid_model/main_core/output.hpp b/power_grid_model_c/power_grid_model/include/power_grid_model/main_core/output.hpp index 8b8766732..1f76b8eb5 100644 --- a/power_grid_model_c/power_grid_model/include/power_grid_model/main_core/output.hpp +++ b/power_grid_model_c/power_grid_model/include/power_grid_model/main_core/output.hpp @@ -366,7 +366,7 @@ template Component, class ComponentContainer, solver_ou requires(Component const& component, std::vector const& solver_output, Idx2D math_id) { { output_result(component, solver_output, math_id) - } -> detail::assignable_to>>; + } -> detail::assignable_to>>; } constexpr ResIt output_result(MainModelState const& state, MathOutput> const& math_output, ResIt res_it) { @@ -382,7 +382,7 @@ template Component, class ComponentContainer, solver_ou std::vector const& solver_output, Idx2D math_id) { { output_result(component, state, solver_output, math_id) - } -> detail::assignable_to>>; + } -> detail::assignable_to>>; } constexpr ResIt output_result(MainModelState const& state, MathOutput> const& math_output, ResIt res_it) { @@ -398,7 +398,7 @@ template Component, class ComponentContainer, solver_ou std::vector const& solver_output, Idx obj_seq) { { output_result(component, state, solver_output, obj_seq) - } -> detail::assignable_to>>; + } -> detail::assignable_to>>; } constexpr ResIt output_result(MainModelState const& state, MathOutput> const& math_output, ResIt res_it) { @@ -414,7 +414,7 @@ template Component, class ComponentContainer, solver_ou Idx2DBranch3 const& math_id) { { output_result(component, solver_output, math_id) - } -> detail::assignable_to>>; + } -> detail::assignable_to>>; } constexpr ResIt output_result(MainModelState const& state, MathOutput> const& math_output, ResIt res_it) { @@ -429,7 +429,7 @@ template Component, class ComponentContainer, typename MathOutput const& math_output, Idx const obj_seq) { { output_result(component, state, math_output, obj_seq) - } -> detail::assignable_to>>; + } -> detail::assignable_to>>; } constexpr ResIt output_result(MainModelState const& state, MathOutput const& math_output, ResIt res_it) { diff --git a/power_grid_model_c/power_grid_model/include/power_grid_model/main_core/state.hpp b/power_grid_model_c/power_grid_model/include/power_grid_model/main_core/state.hpp index e02b564e8..94062f430 100644 --- a/power_grid_model_c/power_grid_model/include/power_grid_model/main_core/state.hpp +++ b/power_grid_model_c/power_grid_model/include/power_grid_model/main_core/state.hpp @@ -30,18 +30,12 @@ concept main_model_state_c = std::same_as concept component_container_c = requires(ContainerType const& c, ID id) { - { c.template citer().begin() } -> std::forward_iterator; - { c.template citer().end() } -> std::forward_iterator; - { - *(c.template citer().begin()) - } -> std::same_as; - { - *(c.template citer().end()) - } -> std::same_as; - { - c.template get_item(id) - } -> std::convertible_to; - }; + { c.template citer().begin() } -> std::forward_iterator; + { c.template citer().end() } -> std::forward_iterator; + { *(c.template citer().begin()) } -> std::same_as; + { *(c.template citer().end()) } -> std::same_as; + { c.template get_item(id) } -> std::convertible_to; +}; template