Skip to content
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

Removing direct value access #30

Open
juxeii opened this issue Jun 11, 2019 · 2 comments
Open

Removing direct value access #30

juxeii opened this issue Jun 11, 2019 · 2 comments

Comments

@juxeii
Copy link

juxeii commented Jun 11, 2019

Hi,
I wonder what would be the fastest way on removing the error-prone * and -> operators for direct value access?
Towards a more monadic implementation I do not want the users accessing these public and unsafe operators.
Would it make sense to declare all the non-class templates as friends to the optional class?
I'm not an expert in library design and your implementation is way beyond my abilities...

Thx
Juergen

@TartanLlama
Copy link
Owner

Probably easiest to remove those functions from the source and run the tests to find any places they were called, then replacing those sites with direct accesses by making the non-members friend functions like you say.

@juxeii
Copy link
Author

juxeii commented Jun 25, 2019

For now I go with a subtype approach and see if I can delete the unsafe operations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants