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

VS2015 failed to compile array properties if element type is smart pointer #41

Open
ddungum opened this issue Jul 17, 2016 · 1 comment
Assignees
Milestone

Comments

@ddungum
Copy link

ddungum commented Jul 17, 2016

I was encountered with compile errors when compiling the following code with Visual Studio 2015. Looks like it happens when a property is an array of smart pointers.

struct Element
{
};

struct Container
{
    std::vector<std::shared_ptr<Element>> elements;
};

PONDER_TYPE( Element );
PONDER_TYPE( Container );

ponder::Class::declare<Element>("Element")
    .constructor<>()
;
ponder::Class::declare<Container>("Container")
    .constructor<>()
    .property("elements", &Container::elements)      // compile error !!
;
@billyquith
Copy link
Owner

Ok, I get the same compile error in clang on Mac. Need to tweak some of the traits.

@billyquith billyquith self-assigned this Jul 17, 2016
@billyquith billyquith added this to the 1.4 milestone Jul 28, 2016
@billyquith billyquith modified the milestones: 1.5, 1.4 Aug 24, 2016
@billyquith billyquith modified the milestones: 2.2 Usage, 2.x - serialise Jan 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants