C++: Permit passing a value to VectorModel::set_vector by value (#4491)

The previous signature would not allow that, but we should allow it for consistency with the constructor.
This commit is contained in:
Simon Hausmann 2024-01-31 16:09:06 +01:00 committed by GitHub
parent e4c087c5b0
commit 45f182e666
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View file

@ -524,4 +524,8 @@ TEST_CASE("VectorModel clear and replace")
REQUIRE(observer->changed_rows.empty());
REQUIRE(observer->removed_rows.empty());
REQUIRE(observer->model_reset);
// Test that taking a vector by value compiles
std::vector<int> new_data { 5, 6, 7, 8 };
model->set_vector(new_data);
}