boostorg / move

Boost.org move module
http://boost.org/libs/move
Boost Software License 1.0
19 stars 55 forks source link

Warning C4624 on MSVC 2019 #28

Closed cmazakas closed 4 years ago

cmazakas commented 4 years ago

A warning is generated by the following struct on latest MSVC using /permissive-: https://github.com/boostorg/move/blob/develop/include/boost/move/detail/type_traits.hpp#L895-L905

warning C4624: 'boost::move_detail::alignment_of_hack<T>': destructor was implicitly defined as deleted

The fix is straight-forward:

template <typename T>
struct alignment_of_hack
{
   T t1;
   char c;
   T t2;
   alignment_of_hack();
   ~alignment_of_hack();
};
igaztanaga commented 4 years ago

Many thanks for the report!