Skip to content

Commit

Permalink
Clean up read-only r_vector declaration / implementation split (#371)
Browse files Browse the repository at this point in the history
Should make it much easier to understand the classes just by looking at the class definition now, with all implementations separated out below
  • Loading branch information
DavisVaughan authored Aug 8, 2024
1 parent df18ba2 commit 21eff5c
Show file tree
Hide file tree
Showing 2 changed files with 239 additions and 221 deletions.
4 changes: 2 additions & 2 deletions inst/include/cpp11/list_of.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ class list_of : public list {
list_of(const list& data) : list(data) {}

#ifdef LONG_VECTOR_SUPPORT
T operator[](int pos) const { return operator[](static_cast<R_xlen_t>(pos)); }
T operator[](const int pos) const { return operator[](static_cast<R_xlen_t>(pos)); }
#endif

T operator[](R_xlen_t pos) const { return list::operator[](pos); }
T operator[](const R_xlen_t pos) const { return list::operator[](pos); }

T operator[](const char* pos) const { return list::operator[](pos); }

Expand Down
Loading

0 comments on commit 21eff5c

Please sign in to comment.