Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Construct DataVector from STL containers #5587

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

nilsvu
Copy link
Member

@nilsvu nilsvu commented Oct 24, 2023

Various places in the code rolled their own solution to this.

Proposed changes

Upgrade instructions

Code review checklist

  • The code is documented and the documentation renders correctly. Run
    make doc to generate the documentation locally into BUILD_DIR/docs/html.
    Then open index.html.
  • The code follows the stylistic and code quality guidelines listed in the
    code review guide.
  • The PR lists upgrade instructions and is labeled bugfix or
    new feature if appropriate.

Further comments

@@ -199,6 +199,18 @@ class VectorImpl
std::fill(data(), data() + set_size, value);
}

// Create from a copy of the given container
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

triple slash

src/DataStructures/VectorImpl.hpp Show resolved Hide resolved
@knelli2
Copy link
Contributor

knelli2 commented Aug 21, 2024

@nilsvu will look into this

@nilsvu nilsvu force-pushed the dv_from_container branch 2 times, most recently from 59b656f to 89651b1 Compare August 21, 2024 20:17
@nilsvu nilsvu requested a review from nilsdeppe August 21, 2024 20:32
///
/// \param container A container with a `value_type` that is the same as `T`.
/// Currently restricted to `std::vector<T>` and `std::array<T>`.
template <typename Container, typename U = typename Container::value_type,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not inline the Container::value_type on the next line?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Various places in the code rolled their own solution to this.
@nilsdeppe nilsdeppe added the auto-merge GitHub's auto-merge has been enabled for this PR. label Aug 21, 2024
@nilsdeppe nilsdeppe merged commit 839322d into sxs-collaboration:develop Aug 22, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge GitHub's auto-merge has been enabled for this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants