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
I think we can make the raw pointer obtaining functor and range adaptor independent so that each component can be used in distinct places.
Naming candidates:
Raw pointer obtaining functor:
iris::as_address(v) -- maybe confusing with std::addressof and std::to_address? They are already confusing, so we might not want to add the third candidate.
iris::as_raw_ptr(v) -- feels better, but somewhat verbose?
Range adaptor:
Depends on the functor's name; iris::views::as_address or iris::views::as_raw_ptr
We want both iris:::views::XXX(r) and r | iris::views::XXX
Raw pointer -> basically returns as-is; for corner cases see below
Notes
We can't directly use std::to_address for raw pointers because it renders the program ill-formed for function pointers; I believe we do need to accept function pointers.
I think we can make the raw pointer obtaining functor and range adaptor independent so that each component can be used in distinct places.
Naming candidates:
iris::as_address(v)-- maybe confusing withstd::addressofandstd::to_address? They are already confusing, so we might not want to add the third candidate.iris::as_raw_ptr(v)-- feels better, but somewhat verbose?iris::views::as_addressoriris::views::as_raw_ptriris:::views::XXX(r)andr | iris::views::XXXSpec
std::addressof(v)std::to_address(v)Notes
std::to_addressfor raw pointers because it renders the program ill-formed for function pointers; I believe we do need to accept function pointers.iris::is_fancy_pointer<T>, checkiris::is_fancy_pointer<T>is needed #65.