ponder icon indicating copy to clipboard operation
ponder copied to clipboard

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

Open ddungum opened this issue 9 years ago • 1 comments

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 !!
;

ddungum avatar Jul 17 '16 15:07 ddungum

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

billyquith avatar Jul 17 '16 19:07 billyquith