Skip to content

Vector of pointers as a property #37

@taketwo

Description

@taketwo

Hi,

Today I was migrating my project to the latest revision of RTTR and came across the following problem. Suppose I have a class that contains a vector of pointers to some object:

struct Container
{
   std::vector<int*> data;
};

With the older version of RTTR I was able to register the vector as a readonly property:

RTTR_REGISTRATION
{
  using namespace rttr;
  registration::class_<Container>("Container")
     .property_readonly("data", &Container::data);
}

However, now compilation fails with this ugly error.

Actually, I have traced down the commit that introduced the problem: 7e651ec, however figuring how to fix it is beyond me :) Any ideas?

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