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

gcpp::dynamic_pointer_cast, gcpp::const_pointer_cast, etc. #30

Open
jwezorek opened this issue Jan 17, 2021 · 1 comment
Open

gcpp::dynamic_pointer_cast, gcpp::const_pointer_cast, etc. #30

jwezorek opened this issue Jan 17, 2021 · 1 comment

Comments

@jwezorek
Copy link

The public interface right now makes it impossible to implement dynamic_pointer_cast, const_pointer_cast, static_pointer_cast, and reinterpret_pointer_cast for deferred pointers.

The deferred_ptr's converting constructor makes it possible to covert between any pointers that for which is_convertible<T,U> is true but that is not enough to do all the common casts. The converting constructor could be made private with the enable_if removed and then the casts could implemented as friend functions?

@hsutter hsutter self-assigned this Sep 28, 2021
@hsutter
Copy link
Owner

hsutter commented Sep 28, 2021

Thanks for this suggestion. For now I'm waiting for feedback and bug reports from actual use of the library, and deferring enhancements and optimizations until then but keeping them in the backlog.

@hsutter hsutter added this to the Future - Backlog milestone Sep 28, 2021
@hsutter hsutter removed their assignment Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants