Skip to content

Commit e8b3fbb

Browse files
Superharzhenryiii
authored andcommitted
Small fix to multi_weight.hpp
1 parent a6b5e81 commit e8b3fbb

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

include/bh_python/multi_weight.hpp

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,13 @@ struct multi_weight_value : public boost::span<T> {
3131
return !operator==(values);
3232
}
3333

34-
// template <class S>
35-
// void operator+=(const S values) {
36-
// void operator+=(const std::vector<T> values) {
37-
// if(values.size() != this->size())
38-
// throw std::runtime_error("size does not match");
39-
// auto it = this->begin();
40-
// for(const T& x : values)
41-
// *it++ += x;
42-
// }
43-
// void operator+=(const boost::span<T> values) {
44-
template <class S>
45-
void operator+=(const S values) {
34+
void operator+=(const std::vector<T> values) {
35+
operator+=(boost::span<T>(values));
36+
}
37+
38+
void operator+=(const boost::span<T> values) {
39+
//template <class S>
40+
//void operator+=(const S values) {
4641
if(values.size() != this->size())
4742
throw std::runtime_error("size does not match");
4843
auto it = this->begin();

0 commit comments

Comments
 (0)