Skip to content

The visualizer multi_index_container<*,indexed_by<hashed_unique<...>>> is not working correctly. #39

@hawk2411

Description

@hawk2411

Small example:
`
//------------

  struct employee
    {
        int         id;
        std::string name;
        int         age;
        employee(int id_, std::string name_, int age_) :id(id_), name(name_), age(age_) {}
    };

   /* tags for accessing the corresponding indices of employee_set */

    struct id {};
    struct name {};
    struct age {};
    struct member {};

    /* see Compiler specifics: Use of member_offset for info on
    * BOOST_MULTI_INDEX_MEMBER
    */

    /* Define a multi_index_container of employees with following indices:
    *   - a unique index sorted by employee::int,
    *   - a non-unique index sorted by employee::name,
    *   - a non-unique index sorted by employee::age.
    */

    typedef multi_index_container<
        employee,
        indexed_by<
        hashed_unique<
        tag<id>, BOOST_MULTI_INDEX_MEMBER(employee, int, id)>,
        ordered_non_unique<
        tag<name>, BOOST_MULTI_INDEX_MEMBER(employee, std::string, name)>,
        ordered_non_unique<
        tag<age>, BOOST_MULTI_INDEX_MEMBER(employee, int, age)>
        >
    > employee_set;

    employee_set es;

    es.insert(employee(0, "Joe", 31));
    es.insert(employee(1, "Robert", 27));
    es.insert(employee(2, "John", 40));
    es.insert(employee(2, "Aristotle", 2387));
    es.insert(employee(3, "Albert", 20));
    es.insert(employee(4, "John", 57));

   employee_set es;

'

The items of the instance "es" are not shown in the Watch View of the Visual Studio debugger. Tested in version 2017, 2019 and 2022.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions