You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix make_exception_ptr_with violation of warning class-memaccess under gcc-12
Summary:
Fix this build failure:
```
folly/lang/Exception.cpp: In instantiation of ‘std::__exception_ptr::exception_ptr folly::detail::make_exception_ptr_from_rep_(Value) [with Value = void*]’:
folly/lang/Exception.cpp:724:40: required from here
folly/lang/Exception.cpp:707:14: warning: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘class std::__exception_ptr::exception_ptr’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
707 | std::memcpy(&ptr, &value, sizeof(value));
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/rh/gcc-toolset-12/root/usr/include/c++/12/exception:168,
from folly/lang/Exception.h:20,
from folly/lang/Exception.cpp:17:
/opt/rh/gcc-toolset-12/root/usr/include/c++/12/bits/exception_ptr.h:90:11: note: ‘class std::__exception_ptr::exception_ptr’ declared here
90 | class exception_ptr
| ^~~~~~~~~~~~~
```
Reviewed By: dmm-fb
Differential Revision: D76616506
fbshipit-source-id: 45bf3a716303e0efb6c22ee0f840c3b4ee5983d9
0 commit comments