Skip to content

Commit 7312b66

Browse files
committed
Mark named_arg constructor as deleted
To avoid an implicit conversion to writable::r_vector, which caused confusion
1 parent 547a494 commit 7312b66

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# cpp11 (development version)
22

3+
* read-only `r_vector` constructors now disallow implicit construction with named arguments (#237)
34
* read-only `r_vector.attr()` methods now return const objects, so it is a compile time error to try to assign to them (#237)
45
* Allow `cpp11::matrix` to be accessed either row-wise or column-wise (the default) depending on the user's choice (@alyst, #229)
56
* Fixed `+` and `+=` operators of `r_vector::[const_]iterator` to conform the *iterators* concept:

inst/include/cpp11/r_vector.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ class r_vector {
103103
};
104104

105105
r_vector(const writable::r_vector<T>& rhs) : r_vector(static_cast<SEXP>(rhs)) {}
106+
r_vector(named_arg) = delete;
106107

107108
bool is_altrep() const;
108109

0 commit comments

Comments
 (0)