1
我遇到了一些問題讓Luabind使用函數的'pure_out_value'屬性。就我而言,Luabind在編譯期間出錯,說模板不包含使用該屬性所需的特定函數。Luabind pure_out_value拒絕編譯
正在使用的代碼是非常相似的一個在test_policies.cpp附帶Luabind:
class IConfiguration
{
int GetString(const char* className, const char* entryName, char** ppszOut);
};
module(L)
[
class_<IConfiguration>("IConfiguration")
.def("GetString", &IConfiguration::GetString, pure_out_value(_3))
];
我得到的,當我嘗試編譯此的誤差:
'apply' : is not a member of 'luabind::detail::pure_out_value_policy<N,Policies>::only_accepts_nonconst_references_or_pointers'
'consumed_args' : is not a member of 'luabind::detail::pure_out_value_policy<N,Policies>::only_accepts_nonconst_references_or_pointers'
'consumed_args' : is not a member of 'luabind::detail::pure_out_value_policy<N,Policies>::only_accepts_nonconst_references_or_pointers'
'converter_postcall' : is not a member of 'luabind::detail::pure_out_value_policy<N,Policies>::only_accepts_nonconst_references_or_pointers'
'match' : is not a member of 'luabind::detail::pure_out_value_policy<N,Policies>::only_accepts_nonconst_references_or_pointers'
相關信息到環境:
- Lua 5.1.4(帶按位補丁)
- Luabind 0.9.1
- 升壓1.53
- 的Visual Studio 2012 W /更新1(與v110_xp設置編譯)
我也試圖與Luabind的公知的補丁版本爲5.2(仍支持5.1太),它可以在這裏找到: https://bitbucket.org/cinderblocks/luabind
Luabind其餘似乎做工精細,只是沒有pure_out_value政策雖然。