[ ] I searched the issues and found no similar issues.
What happened + What you expected to happen
wsl2 ubuntu 24.04 环境,cmake 默认编译报错
In file included from /home/yalantinglibs/include/ylt/reflection/member_ptr.hpp:2, from /home/yalantinglibs/include/ylt/reflection/member_names.hpp:5, from /home/yalantinglibs/include/ylt/reflection/member_value.hpp:7, from /home/yalantinglibs/src/reflection/tests/test_reflection.cpp:4: /home/yalantinglibs/include/ylt/reflection/member_count.hpp:15:23: error: 'uint64_t' has not been declared 15 | template <typename T, uint64_t version>
In file included from /home/yalantinglibs/include/ylt/struct_pack/alignment.hpp:20, from /home/yalantinglibs/include/ylt/struct_pack.hpp:23, from /home/yalantinglibs/include/ylt/coro_rpc/impl/errno.h:17, from /home/yalantinglibs/include/ylt/coro_rpc/impl/coro_connection.hpp:35, from /home/yalantinglibs/include/ylt/coro_rpc/impl/context.hpp:29, from /home/yalantinglibs/include/ylt/coro_rpc/impl/coro_rpc_client.hpp:51, from /home/yalantinglibs/include/ylt/coro_rpc/coro_rpc_client.hpp:17, from /home/yalantinglibs/src/coro_rpc/tests/test_coro_rpc_server.cpp:21: /home/yalantinglibs/include/ylt/struct_pack/reflection.hpp: In member function 'std::vector<std::byte> coro_rpc::coro_rpc_client::prepare_buffer(uint32_t&, Args&& ...) [with auto func = large_arg_fun; Args = {std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&}]': /home/yalantinglibs/include/ylt/struct_pack/reflection.hpp:297:13: warning: writing 4 bytes into a region of size 0 [-Wstringop-overflow=] 297 | memcpy(buffer, data, len);
Search before asking
What happened + What you expected to happen
wsl2 ubuntu 24.04 环境,cmake 默认编译报错
In file included from /home/yalantinglibs/include/ylt/reflection/member_ptr.hpp:2, from /home/yalantinglibs/include/ylt/reflection/member_names.hpp:5, from /home/yalantinglibs/include/ylt/reflection/member_value.hpp:7, from /home/yalantinglibs/src/reflection/tests/test_reflection.cpp:4: /home/yalantinglibs/include/ylt/reflection/member_count.hpp:15:23: error: 'uint64_t' has not been declared 15 | template <typename T, uint64_t version>
Reproduction way
我自己尝试该环境是必现的
Anything else
在 <ylt/reflection/member_count.hpp> 添加:
#include <cstdint>
随后,编译通过,但是有以下的报警,我就忽略了In file included from /home/yalantinglibs/include/ylt/struct_pack/alignment.hpp:20, from /home/yalantinglibs/include/ylt/struct_pack.hpp:23, from /home/yalantinglibs/include/ylt/coro_rpc/impl/errno.h:17, from /home/yalantinglibs/include/ylt/coro_rpc/impl/coro_connection.hpp:35, from /home/yalantinglibs/include/ylt/coro_rpc/impl/context.hpp:29, from /home/yalantinglibs/include/ylt/coro_rpc/impl/coro_rpc_client.hpp:51, from /home/yalantinglibs/include/ylt/coro_rpc/coro_rpc_client.hpp:17, from /home/yalantinglibs/src/coro_rpc/tests/test_coro_rpc_server.cpp:21: /home/yalantinglibs/include/ylt/struct_pack/reflection.hpp: In member function 'std::vector<std::byte> coro_rpc::coro_rpc_client::prepare_buffer(uint32_t&, Args&& ...) [with auto func = large_arg_fun; Args = {std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&}]': /home/yalantinglibs/include/ylt/struct_pack/reflection.hpp:297:13: warning: writing 4 bytes into a region of size 0 [-Wstringop-overflow=] 297 | memcpy(buffer, data, len);
Are you willing to submit a PR?