|
4 | 4 | #include <iterator> |
5 | 5 | #include <string> // for string |
6 | 6 |
|
7 | | -#include "cpp11/R.hpp" // for SEXP, SEXPREC, R_xlen_t, INT... |
8 | | -#include "cpp11/r_bool.hpp" // for r_bool |
9 | | -#include "cpp11/r_string.hpp" // for r_string |
10 | | -#include "cpp11/r_vector.hpp" // for r_vector |
11 | | -#include "cpp11/sexp.hpp" // for sexp |
| 7 | +#include "cpp11/R.hpp" // for SEXP, SEXPREC, R_xlen_t, INT... |
| 8 | +#include "cpp11/attribute_proxy.hpp" // for attribute_proxy |
| 9 | +#include "cpp11/r_bool.hpp" // for r_bool |
| 10 | +#include "cpp11/r_string.hpp" // for r_string |
| 11 | +#include "cpp11/r_vector.hpp" // for r_vector |
| 12 | +#include "cpp11/sexp.hpp" // for sexp |
12 | 13 |
|
13 | 14 | namespace cpp11 { |
14 | 15 |
|
@@ -189,11 +190,11 @@ class matrix : public matrix_slices<S> { |
189 | 190 |
|
190 | 191 | operator SEXP() const { return SEXP(vector_); } |
191 | 192 |
|
192 | | - SEXP attr(const char* name) { return vector_.attr(name); } |
| 193 | + attribute_proxy<V> attr(const char* name) { return vector_.attr(name); } |
193 | 194 |
|
194 | | - SEXP attr(const std::string& name) { return vector_.attr(name); } |
| 195 | + attribute_proxy<V> attr(const std::string& name) { return vector_.attr(name); } |
195 | 196 |
|
196 | | - SEXP attr(SEXP name) { return vector_.attr(name); } |
| 197 | + attribute_proxy<V> attr(SEXP name) { return vector_.attr(name); } |
197 | 198 |
|
198 | 199 | void attr(const char* name, SEXP value) { vector_.attr(name) = value; } |
199 | 200 |
|
|
0 commit comments