Skip to content

Need some adaptor for transforming plain variable / fancy pointer to raw pointer #66

Description

@saki7

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

Spec

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.
  • We definitely need iris::is_fancy_pointer<T>, check iris::is_fancy_pointer<T> is needed #65.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions