Clang 19 compilation failure in bsoncolumnbuilder.h due to call to deleted constructor of TrackingAllocator

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Server Programmability
    • Fully Compatible
    • Programmability 2024-12-09
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Clang 19 encounters a compilation failure in bsoncolumnbuilder.h. BSONColumnBuilder defines a unary constructor that takes an instance of a templated allocator type, which defaults to a default-constructed instance. Sometimes BSONColumnBuilder instances instantiate the Allocator template with the TrackingAllocator, which explicitly deletes the nullary constructor. As a result, any such instance that attempts to default-construct will fail in compilation.

      It's unclear why Clang 19 uniquely runs into this issue (full compile output will be posted in a comment), but in any case we should tolerate allocator types which are not default-constructible because the C++ standard does not require them to be.

              Assignee:
              James Bronsted
              Reporter:
              James Bronsted
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: