Skip to content

Pretty printer error printing flat map #314

@jarro2783

Description

@jarro2783

Boost: 1.88.0
GCC: 15.1

In the basic example below that uses unordered_flat_map, and breaking in gdb at the cout, gdb fails to print the contents of the map.

#include <boost/unordered/unordered_flat_map.hpp>

#include <iostream>

int main()
{
  boost::unordered_flat_map<int, int> map;

  map.emplace(1, 2);
  map.emplace(3, 5);
  map.emplace(5, 6);

  std::cout << map.size() << std::endl;
}
(gdb) print map
$1 = boost::unordered_flat_map with 3 elements = {[5] = 6Python Exception <class 'gdb.error'>: There is no member or method named N.

It seems like gcc might be compiling out the static constexpr member N in the group15 class.

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