billyquith / ponder

C++ reflection library with Lua binding, and JSON and XML serialisation.
http://billyquith.github.io/ponder/
Other
640 stars 93 forks source link

missing Class::construct #79

Closed michaelaeriksen closed 4 years ago

michaelaeriksen commented 7 years ago

The documentation tells me to create objects like this

but I can't find the construct or destroy method in the Class class! And it looks like all tests have been commented out that uses that!

So what is the right way to instantiate an object from a metaclass?

billyquith commented 7 years ago

Oops, yes the project home page, is stale. The code has changed.

See the project simple example, which is in the docs: https://billyquith.github.io/ponder/docs/index.html

alexander-v commented 7 years ago
template <typename T>
struct ValueProviderImpl<T*, ValueKind::User>
{
    T* operator()() {return classByType<T>().construct().template get<T*>();}
};

in https://github.com/billyquith/ponder/blob/master/include/ponder/detail/valueprovider.hpp#L87 doesnt compile