-
-
Notifications
You must be signed in to change notification settings - Fork 220
Fix ListOf inheritance and compatibility of NamesProxy #1464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| // ListOf.h: Rcpp R/C++ interface class library -- templated List container | ||
| // | ||
| // Copyright (C) 2014 Dirk Eddelbuettel, Romain Francois and Kevin Ushey | ||
| // Copyright (C) 2014 - 2025 Dirk Eddelbuettel, Romain François and Kevin Ushey | ||
| // Copyright (C) 2026 Dirk Eddelbuettel, Romain François, Kevin Ushey and Iñaki Ucar | ||
| // | ||
| // This file is part of Rcpp. | ||
| // | ||
|
|
@@ -24,9 +25,9 @@ namespace Rcpp { | |
|
|
||
| template <typename T> | ||
| class ListOf | ||
| : public NamesProxyPolicy<T> | ||
| , public AttributeProxyPolicy<T> | ||
| , public RObjectMethods<T> | ||
| : public NamesProxyPolicy<ListOf<T>> | ||
| , public AttributeProxyPolicy<ListOf<T>> | ||
| , public RObjectMethods<ListOf<T>> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am a bit surprised how this suddenly becomes recursive (in the usual 'curious' manner) but does not require code changes. That seems like a free lunch. I am probably missing something.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The intention here was to make use of CRTP; I think I erred in leaving out the ListOf in the inheritance. |
||
| { | ||
|
|
||
| public: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks like a great simplification we can do now / could not do then.