diff --git a/tests/test_class_sh_property_bakein.cpp b/tests/test_class_sh_property_bakein.cpp index 0fae55101..6063aab5a 100644 --- a/tests/test_class_sh_property_bakein.cpp +++ b/tests/test_class_sh_property_bakein.cpp @@ -1,9 +1,11 @@ #include "pybind11_tests.h" +#include + namespace test_class_sh_property_bakein { struct WithCharArrayMember { - WithCharArrayMember() { std::strcpy(char6_member, "Char6"); } + WithCharArrayMember() { std::memcpy(char6_member, "Char6", 6); } char char6_member[6]; };