forked from boostorg/function
Compare commits
4 Commits
feature/us
...
boost-1.74
Author | SHA1 | Date | |
---|---|---|---|
4841cbf475 | |||
b07c2efef5 | |||
1aa3e8c8d7 | |||
7c90434317 |
@ -23,6 +23,14 @@ environment:
|
||||
TOOLSET: msvc-14.1
|
||||
CXXSTD: 14,17
|
||||
ADDRMD: 32,64
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
TOOLSET: clang-win
|
||||
CXXSTD: 14,17
|
||||
ADDRMD: 64
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||
TOOLSET: msvc-14.2
|
||||
CXXSTD: 14,17
|
||||
ADDRMD: 32,64
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
ADDPATH: C:\cygwin\bin;
|
||||
TOOLSET: gcc
|
||||
|
@ -898,11 +898,20 @@ namespace boost {
|
||||
{
|
||||
if (!f.empty()) {
|
||||
this->vtable = f.vtable;
|
||||
if (this->has_trivial_copy_and_destroy())
|
||||
if (this->has_trivial_copy_and_destroy()) {
|
||||
// Don't operate on storage directly since union type doesn't relax
|
||||
// strict aliasing rules, despite of having member char type.
|
||||
# if defined(BOOST_GCC) && (BOOST_GCC >= 40700)
|
||||
# pragma GCC diagnostic push
|
||||
// This warning is technically correct, but we don't want to pay the price for initializing
|
||||
// just to silence a warning: https://github.com/boostorg/function/issues/27
|
||||
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||
# endif
|
||||
std::memcpy(this->functor.data, f.functor.data, sizeof(boost::detail::function::function_buffer));
|
||||
else
|
||||
# if defined(BOOST_GCC) && (BOOST_GCC >= 40700)
|
||||
# pragma GCC diagnostic pop
|
||||
# endif
|
||||
} else
|
||||
get_vtable()->base.manager(f.functor, this->functor,
|
||||
boost::detail::function::clone_functor_tag);
|
||||
}
|
||||
@ -987,11 +996,20 @@ namespace boost {
|
||||
BOOST_TRY {
|
||||
if (!f.empty()) {
|
||||
this->vtable = f.vtable;
|
||||
if (this->has_trivial_copy_and_destroy())
|
||||
if (this->has_trivial_copy_and_destroy()) {
|
||||
// Don't operate on storage directly since union type doesn't relax
|
||||
// strict aliasing rules, despite of having member char type.
|
||||
# if defined(BOOST_GCC) && (BOOST_GCC >= 40700)
|
||||
# pragma GCC diagnostic push
|
||||
// This warning is technically correct, but we don't want to pay the price for initializing
|
||||
// just to silence a warning: https://github.com/boostorg/function/issues/27
|
||||
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||
# endif
|
||||
std::memcpy(this->functor.data, f.functor.data, sizeof(this->functor.data));
|
||||
else
|
||||
# if defined(BOOST_GCC) && (BOOST_GCC >= 40700)
|
||||
# pragma GCC diagnostic pop
|
||||
# endif
|
||||
} else
|
||||
get_vtable()->base.manager(f.functor, this->functor,
|
||||
boost::detail::function::move_functor_tag);
|
||||
f.vtable = 0;
|
||||
|
Reference in New Issue
Block a user