Open tom-seddon opened 1 year ago
Hey, awesome reproduction!
This looks like a critical compiler bug indeed and you might want to report it to MSVC directly. Additionally you could open a thread on https://www.reddit.com/r/cpp, maybe someone from the MSVC team or someone with deeper knowledge of the MSVC internals could elaborate on it there. Definitly seems like a bug worth elaborating about, because it has a larger impact.
For this particular library it is difficult to work around this bug.
Sadly it is impossible to rename the result
class just for the reason of this bug for backwards compatibility reasons.
Do you have any suggestions beside a hint in the documentation?
@Naios
Using Continuable 4.1.0
Reproduction steps:
copy con test.cpp
)Note probably-unexpected error...
In the end I tracked this down to captured variables in msvc apparently giving their lambda's type member variables of the same name. So
result
is a member variable on the base class forproxy_continuable
in this case.This feels like a msvc problem - looks like clang and gcc must rename the captured variables, or use some other mechanism? - but perhaps it's fixable. I'm afraid I stopped at C++14 so I have no specific suggestions. Maybe a note in the documentation would suffice.
Compiler Explorer example that I think narrows it down to the issue: https://godbolt.org/z/7qz4sd7sT
Thanks,
--Tom