Skip to content

[regression] no viable constructor for offset_ptr with clang from 1.87.0 #252

@wanghan02

Description

@wanghan02

Example code could be found as below or on godbolt. The example compiles fine with VS/gcc + boost 1.87.0 or clang + boost 1.86.0. It fails with clang + boost 1.87.0.

#include <boost/interprocess/managed_shared_memory.hpp>
#include <boost/interprocess/allocators/allocator.hpp>
#include <map>

using namespace boost::interprocess;

managed_shared_memory g_segment(create_only, "shared", 65536);

template<typename T>
struct shared_allocator: allocator<T, managed_shared_memory::segment_manager>
{
    using base_=allocator<T, managed_shared_memory::segment_manager>;
    
    shared_allocator(): base_(g_segment.get_segment_manager()) {}

    template<typename U>
    struct rebind final {
        using other = shared_allocator<U>;
    };
};

std::map<int, int, std::less<int>, shared_allocator<std::pair<int const, int>>> mapnn;

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