-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compilation error on MSVC 16.4.2 #26
Comments
Thanks for reporting this issue, I'll take a look after work today. I was sure permissive- was being used already. |
I just tried with permissive+, and I'm having the same error. Maybe it is related to a newer version of MSVC? |
I was previously using 16.4.0 and now with permissive- I am encountering this issue. Naturally reinterpret_cast allows even private policy inheritance and Fix will be soon, the static cast must be made in Observer and not in the policy. |
Awesome, thanks for the very quick fix. I just tried your library again, and the performances are top-notch, very nice work. |
No problem, glad you like the library, and thanks again for reporting the issue. |
* [nano-signal-slot] Update to latest version I know that official releases should be preferred, but I used the latest commit instead because it fix an issue which was causing compilations error on the latest MSVC version (NoAvailableAlias/nano-signal-slot#26). * [nano-signal-slot] Fix wrong date format * [nano-signal-slot] Version update The developer of this library has just added a new release version including the MSVC compilation bug fix.
Hello,
When trying to build a project using nano-signal-slot, I get the following error :
Error C7510 'static_pointer_cast': use of dependent template name must be prefixed with 'template'
From this line in nano_observer.hpp :
line 111: MT_Policy::static_pointer_cast<Observer>(observer)->remove(slot.delegate);
I'm using Visual studio 2019 version 16.4.2 with C++17 and conformant mode enabled.
If I try to fix this error by adding the template keyword like this :
line 111: MT_Policy::template static_pointer_cast<Observer>(observer)->remove(slot.delegate);
Then I get the following error :
Error C2243 'static_cast': conversion from 'Nano::ST_Policy::Weak_Ptr' to 'T *' exists, but is inaccessible
Which can be fixed by changing the inheritance mode of MT_Policy to public (though it's probably not the best way to fix it) :
line 13: class Observer : public MT_Policy
The text was updated successfully, but these errors were encountered: