We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
json.hpp支持char[],但是换成msgpack就编译失败了, 请看看能不能支持一下啊,第三方接口里面有char[],没有办法回避~
#include <iguana/msgpack.hpp>
namespace client { struct game { char ip[32]; // add for test std::string name; double price; }; REFLECTION(game,ip, name, price); }
1>------ 已启动生成: 项目: msgpack_example, 配置: Debug Win32 ------ 1>msgpack_example.cpp \iguana\iguana\reflection.hpp(388): error C2672: “std::make_tuple”: 未找到匹配的重载函数
The text was updated successfully, but these errors were encountered:
char[n] 这样的在很多sdk都是这么声明的。期待实现
Sorry, something went wrong.
lazy
template <typename T> concept char_array_t = std::is_same_v<typename std::remove_extent<T>::type, char>; template <class T> concept str_t = std::convertible_to<std::decay_t<T>, std::string_view> && !str_view_t<T> && !char_array_t<T>; template <typename Type> concept fixed_array = (c_array<Type> || array<Type>) && !char_array_t<Type>; template<char_array_t U, class It, size_t n> IGUANA_INLINE void parse_item(U(&charArray)[n], It&& it, It&& end) { std::string parsed_str; parse_item<std::string, It>(parsed_str, it, end); parsed_str.copy(charArray, n-1); } template <typename Stream, char_array_t T, size_t n> IGUANA_INLINE void render_json_value(Stream& ss, T(&t)[n]) { ss.push_back('"'); ss.append(t); ss.push_back('"');
No branches or pull requests
json.hpp支持char[],但是换成msgpack就编译失败了,
请看看能不能支持一下啊,第三方接口里面有char[],没有办法回避~
#include <iguana/msgpack.hpp>
namespace client
{
struct game
{
char ip[32]; // add for test
std::string name;
double price;
};
REFLECTION(game,ip, name, price);
}
编译错误
1>------ 已启动生成: 项目: msgpack_example, 配置: Debug Win32 ------
1>msgpack_example.cpp
\iguana\iguana\reflection.hpp(388): error C2672: “std::make_tuple”: 未找到匹配的重载函数
The text was updated successfully, but these errors were encountered: