Rapidjson::Value 能不能做为返回值??

大家好,我想返回一个rapidjson::Value类型,代码如下

rapidjson::Document doc;
doc.SetObject();
rapidjson::Document::AllocatorType& allocator = doc.GetAllocator();
rapidjson::Value step(rapidjson::kObjectType);

step.AddMember(“int”, getInstanceId(), allocator);

return step;

return step; 这行会提示错误,
Error:"rapidjson::GenericValue<Encoding, Allocator>::GenericValue(const rapidjson::GenericValue<Encoding, Allocator> &rhs)“其中Encoding=rapidjson::UTF8,
Allocator=rapidjson::MemoryPoolAllocatorrapidjson::CrtAllocator]”(已声明 所在行数:54,所属文件:“…/document.h”)不可访问。

望大神们给点意见,万分感谢!

已经解决!

如何解决的.

使用& 引用解决传值问题。

具体怎么写的。。用引用也不行啊?还是报错

rapidjson::Value没实现右值引用的构造器吗?

楼主你这个到底怎么写的 啊,我还是调不到
http://www.cocoachina.com/bbs/read.php?tid-285918.html 帮我看看哪里写错了呗

http://www.cocoachina.com/bbs/read.php?tid-179678-page-1.html
这个楼主谁啊这么水