Skip to content

gcc compilation problem #1069

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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