Skip to content

issue with unique_ptr ? #608

Description

@jkhoogland

Hi,

I came across the following issue today which seems like a bug.

I have a class Foo that produces Bar and returns a unique_ptr to an instance of Bar.

On running a C++11 executable it works fine (little main in the code attached).
On running python, it craps out with

RuntimeError: return_value_policy = move, but the object is neither movable nor copyable!

Am I missing something ? The class Bar is moveable, and copyable...

Code attached to reproduce.

pybind11_issue_unique_ptr.zip

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

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions