rttrorg / rttr

C++ Reflection Library
https://www.rttr.org
MIT License
3.18k stars 441 forks source link

registration of a unique_ptr #26

Closed tdo1 closed 7 years ago

tdo1 commented 7 years ago

hi i would register a unique_ptr is it possible ?


`#pragma once

#include <rttr/registration>
#include <iostream>
#include <memory>

using namespace rttr;
class MyStruct 
{
public : 
    MyStruct(); 
    void func(double); 
    int data; 
    std::unique_ptr<int> testUniquePointer;

    RTTR_ENABLE()
};

RTTR_REGISTRATION
{
    registration::class_<MyStruct>("MyStruct")
    .constructor<>()
    .property("data", &MyStruct::data)
    .method("func", &MyStruct::func)
    .property("testWeakPointer", &MyStruct::testUniquePointer);
}`
acki-m commented 7 years ago

Maybe this answer will help you: https://github.com/rttrorg/rttr/issues/10 When it will fix your issue, please close it, otherwise response again