Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
apolukhin committed Dec 17, 2024
1 parent 2f060d3 commit f2c2ee3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions include/boost/dll/detail/aggressive_ptr_cast.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ BOOST_FORCEINLINE typename std::enable_if<!std::is_member_pointer<To>::value &&

static_assert(
std::is_void< typename std::remove_pointer<To>::type >::value
|| boost::is_void< typename boost::remove_pointer<From>::type >::value,
|| std::is_void< typename std::remove_pointer<From>::type >::value,
"`agressive_ptr_cast` function must be used only for casting to or from void pointers."
);

Expand Down Expand Up @@ -92,7 +92,7 @@ BOOST_FORCEINLINE typename std::enable_if<std::is_member_pointer<To>::value && !
);

static_assert(
std::is_void< typename boost::remove_pointer<From>::type >::value,
std::is_void< typename std::remove_pointer<From>::type >::value,
"`agressive_ptr_cast` function must be used only for casting to or from void pointers."
);

Expand Down
6 changes: 3 additions & 3 deletions include/boost/dll/detail/ctor_dtor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ template<typename Class, typename Lib>
destructor<Class> load_dtor(Lib & lib, const mangled_storage_impl::dtor_sym & dt) {
typedef typename destructor<Class>::standard_t standard_t;
//@apolukhin That does NOT work this way with MSVC-14 x32 via memcpy. The x64 is different.
//standard_t dtor = &lib.template get< typename boost::remove_pointer<standard_t>::type >(dt);
//standard_t dtor = &lib.template get< typename std::remove_pointer<standard_t>::type >(dt);
void * buf = &lib.template get<unsigned char>(dt);
standard_t dtor;
std::memcpy(&dtor, &buf, sizeof(dtor));
Expand Down Expand Up @@ -175,11 +175,11 @@ destructor<Class> load_dtor(Lib & lib, const mangled_storage_impl::dtor_sym & dt

//see here for the abi http://mentorembedded.github.io/cxx-abi/abi.html#mangling-special-ctor-dtor
if (!dt.D1.empty()) {
s = &lib.template get< typename boost::remove_pointer<stand>::type >(dt.D1);
s = &lib.template get< typename std::remove_pointer<stand>::type >(dt.D1);
}

if (!dt.D0.empty()) {
d = &lib.template get< typename boost::remove_pointer<delet>::type >(dt.D0);
d = &lib.template get< typename std::remove_pointer<delet>::type >(dt.D0);
}

return destructor<Class>(s,d);
Expand Down

0 comments on commit f2c2ee3

Please sign in to comment.