-
Notifications
You must be signed in to change notification settings - Fork 178
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
Windows compile error #585
Comments
So that we can solve the problem, we need to look at the source code that causes the error and the compilation options. If the source code is not provided, the issue may be closed soon - a minimally reproducible example has not been provided in full. Yes, it can be just #include "sml.hpp"
void main() {} If we look deeper, then maybe here error: struct lock_guard {
constexpr explicit lock_guard(TLock &lock) : lock_{lock} { lock_.lock(); }
~lock_guard() { lock_.unlock(); }
TLock &lock_;
}; and solution is declare member struct lock_guard {
TLock &lock_;
constexpr explicit lock_guard(TLock &lock) : lock_{lock} { lock_.lock(); }
~lock_guard() { lock_.unlock(); }
}; But declare before use rule not required inside a class SO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected Behavior
Previously it was compiling in Windows using clang-cl 13.
Actual Behavior
Failing with message:
'boost::sml::back::policies::thread_safe<std::recursive_mutex>::create_lock()::lock_guard::~lock_guard()::lock_guard::lock_' is not a member of class 'lock_guard' ~lock_guard() { lock_.unlock(); }
Steps to Reproduce the Problem
Compile with clang-cl 13
Specifications
The text was updated successfully, but these errors were encountered: