mirror of
https://github.com/pybind/pybind11.git
synced 2025-01-19 17:32:37 +00:00
Use memcpy
instead of strcpy
to resolve MSVC errors.
This commit is contained in:
parent
c65d5dfaa8
commit
89da1e2ef7
@ -1,9 +1,11 @@
|
|||||||
#include "pybind11_tests.h"
|
#include "pybind11_tests.h"
|
||||||
|
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
namespace test_class_sh_property_bakein {
|
namespace test_class_sh_property_bakein {
|
||||||
|
|
||||||
struct WithCharArrayMember {
|
struct WithCharArrayMember {
|
||||||
WithCharArrayMember() { std::strcpy(char6_member, "Char6"); }
|
WithCharArrayMember() { std::memcpy(char6_member, "Char6", 6); }
|
||||||
char char6_member[6];
|
char char6_member[6];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user