Skip to content

Commit

Permalink
double constructor is again implicit
Browse files Browse the repository at this point in the history
  • Loading branch information
konrad.kraemer committed May 29, 2024
1 parent b47df40 commit 91f5519
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions include/etr_bits/Vector/Constructors.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

template <typename T2> Vec(T2 n) = delete;
// internally used
explicit Vec(SI &sz) : d(sz.sz) {
explicit Vec(SI &sz) : d(sz.sz) {
std::cout << "constructor test1" << std::endl;
}
explicit Vec(SI &&sz) : d(sz.sz) {
std::cout << "constructor test2" << std::endl;
std::cout << "constructor test2" << std::endl;
}

// move constructors
Expand Down Expand Up @@ -105,16 +105,15 @@ explicit Vec(int sz) : d(1) {
d[0] = static_cast<T>(sz);
}
explicit Vec(std::size_t sz) : d(1) { d[0] = sz; }
explicit Vec(double sz) : d(1) { d[0] = sz; }
Vec(double sz) : d(1) { d[0] = sz; }

#ifdef STANDALONE_ETR
Vec(bool b) : d(1) { d[0] = static_cast<T>(b); }
#else
Vec(Rboolean b) : d(1) { d[0] = static_cast<T>(b); }
#endif

explicit Vec() : d() { std::cout << "constructor test4" << std::endl;
}
explicit Vec() : d() { std::cout << "constructor test4" << std::endl; }
explicit Vec(std::size_t rows, std::size_t cols) : d(rows * cols) {
d.setMatrix(true, rows, cols);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/BaseStore_Tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,6 @@ void test_basestore() {
}

int main(int argc, char *argv[]) {
test_basestore();
// test_basestore();
return 0;
}

0 comments on commit 91f5519

Please sign in to comment.