-
Notifications
You must be signed in to change notification settings - Fork 189
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
Conversation
src/DataStructures/VectorImpl.hpp
Outdated
@@ -199,6 +199,18 @@ class VectorImpl | |||
std::fill(data(), data() + set_size, value); | |||
} | |||
|
|||
// Create from a copy of the given container |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
triple slash
@nilsvu will look into this |
59b656f
to
89651b1
Compare
src/DataStructures/VectorImpl.hpp
Outdated
/// | ||
/// \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, |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
89651b1
to
2555874
Compare
Various places in the code rolled their own solution to this.
Proposed changes
Upgrade instructions
Code review checklist
make doc
to generate the documentation locally intoBUILD_DIR/docs/html
.Then open
index.html
.code review guide.
bugfix
ornew feature
if appropriate.Further comments