MSVC 17.10.0 + modules cannot find definition (#3972)

MSVC regressed since the new 17.10.0 compiler update. node<> cannot be found for detail::dynamic_arg_list::typed_node.
This commit is contained in:
Matthias Moulin 2024-05-28 20:34:44 +02:00 committed by GitHub
parent 728f9bc388
commit 43ab964c47
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -30,15 +30,18 @@ auto unwrap(const std::reference_wrapper<T>& v) -> const T& {
return static_cast<const T&>(v); return static_cast<const T&>(v);
} }
class dynamic_arg_list { // node is defined outside dynamic_arg_list to workaround a C2504 bug in MSVC
// Workaround for clang's -Wweak-vtables. Unlike for regular classes, for // 2022 (v17.10.0)
// templates it doesn't complain about inability to deduce single translation //
// unit for placing vtable. So storage_node_base is made a fake template. // Workaround for clang's -Wweak-vtables. Unlike for regular classes, for
template <typename = void> struct node { // templates it doesn't complain about inability to deduce single translation
virtual ~node() = default; // unit for placing vtable. So storage_node_base is made a fake template.
std::unique_ptr<node<>> next; template <typename = void> struct node {
}; virtual ~node() = default;
std::unique_ptr<node<>> next;
};
class dynamic_arg_list {
template <typename T> struct typed_node : node<> { template <typename T> struct typed_node : node<> {
T value; T value;