Skip to content

gcc compilation problem #1069

@hkaiser

Description

@hkaiser

This code:

pybind11::object func = ...;
pybind11::dict d = func.attr("__class__").attr("__dict__");

compiles for MSVC and clang (and works as expected) but causes a compiler error for gcc 6 and gcc 7 complaining about not being able to convert a str_attr_accessor to a dict. I'm not sure if I'm trying to do the right thing here, so this might not be a real issue, just my ignorance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions