Skip to content

Regression boost 1.87: offset_ptr conversion from void no longer works #272

@liss-h

Description

@liss-h

Hello,

in boost <=1.86 the following always worked to convert a offset_ptr<void> to another type (e.g. offset_ptr<int>).

boost::interprocess::offset_ptr<void> x{};
auto y = boost::interprocess::offset_ptr<int>{x};

But since 1.87 it no longer works (the constraints are no longer satisfied) see: https://godbolt.org/z/T36xrvMnn

reinterpret_pointer_cast<int>(x) also does not work by default because it cannot infer the additional template params (difference type and such), so they would always need to be provided. I assume this is not intended.

If it is intended, I would be glad if you would show me the intended way for the conversion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions