skypjack / uvw

Header-only, event based, tiny and easy to use libuv wrapper in modern C++ - now available as also shared/static library!
MIT License
1.87k stars 211 forks source link

Compiler errors with inacessible desctructor for enable_shared_from_this (Intel C++ for windows 19.1) #208

Closed mizvekov closed 4 years ago

mizvekov commented 4 years ago

Tested with uvw-2.6.0 / libuv-v1.38 on Intel C++ compiler for windows 19.1. Error obtained:

uvw\resource.hpp(44): error #453: protected function "std::enable_shared_from_this<_Ty>::~enable_shared_from_this [with _Ty=uvw::ProcessHandle]" (declared at line 1735 of "MSVC\14.26.28801\include\memory") is not accessible through a "std::enable_shared_from_this<uvw::ProcessHandle>" pointer or object
              std::enable_shared_from_this<T>{}
                                             ^
            detected during instantiation of "uvw::Resource<T, U>::Resource(uvw::Resource<T, U>::ConstructorAccess, std::shared_ptr<uvw::Loop>) [with T=uvw::ProcessHandle, U=uv_process_t]" at line 67 of "uvw\handle.hpp"

  compilation aborted for uvw\process.cpp (code 2)

While I think this is the compilers own problem, the line is simply unneeded and removing it let's everything else work.

skypjack commented 4 years ago

Thanks for pointing this out. Fixed upstream on experimental.