Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vector of pointers as a property #37

Closed
taketwo opened this issue Jan 27, 2017 · 4 comments
Closed

Vector of pointers as a property #37

taketwo opened this issue Jan 27, 2017 · 4 comments

Comments

@taketwo
Copy link
Contributor

taketwo commented Jan 27, 2017

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?

@acki-m
Copy link
Contributor

acki-m commented Jan 27, 2017

Can you tell me, which compiler you used?

@taketwo
Copy link
Contributor Author

taketwo commented Jan 27, 2017

Ooops, forgot to mention the most important thing! I'm on Ubuntu 16.04 with the default GCC:

$ c++ --version
c++ (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609

@taketwo
Copy link
Contributor Author

taketwo commented Jan 27, 2017

FWIW, here is what I get with clang 3.8.0.

@acki-m acki-m closed this as completed in fc50246 Jan 28, 2017
@taketwo
Copy link
Contributor Author

taketwo commented Jan 30, 2017

This does solve the problem. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants