You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, people think that sol::readonly will work on any arbitrary object they set into a table (as per #254). It would be highly beneficial to have a readonly marker for making a whole table read-only, or to at least provide an example in the sol2 examples on how to perform this kind of operation so people understand it better.
The text was updated successfully, but these errors were encountered:
Unfortunately, we cannot generalize readonly. This would require use to essentially sweep the contents out from under the user, and ultimately screw them over in cases where they set a table as readonly but aren't done working with it or other cases where users would find the behavior unexpected. It also hijacks the __index function, which would make it unintuitive for when a user sets multiple things.
Currently, people think that
sol::readonly
will work on any arbitrary object they set into a table (as per #254). It would be highly beneficial to have a readonly marker for making a whole table read-only, or to at least provide an example in the sol2 examples on how to perform this kind of operation so people understand it better.The text was updated successfully, but these errors were encountered: