Skip to content
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

[MSVC] serializeValue: no matching overloaded function found #3480

Open
zaddach opened this issue May 13, 2024 · 2 comments
Open

[MSVC] serializeValue: no matching overloaded function found #3480

zaddach opened this issue May 13, 2024 · 2 comments
Assignees

Comments

@zaddach
Copy link
Contributor

zaddach commented May 13, 2024

I'm getting a couple of those compile errors:

C:\dev\kuzu\src\include\common/serializer/serializer.h(59,17): error C2672: 'kuzu::common::Serializer::serializeValue': no matching overloaded function found [C:\dev\kuzu\build\src\catalog\catalog_entry\kuzu_catalog_entry.vcxproj]
C:\dev\kuzu\src\include\common/serializer/serializer.h(21,10): message : could be 'void kuzu::common::Serializer::serializeValue(const T &)' [C:\dev\kuzu\build\src\catalog\catalog_entry\kuzu_catalog_entry.vcxproj]
C:\dev\kuzu\src\include\common/serializer/serializer.h(59,17): message : the associated constraints are not satisfied [C:\dev\kuzu\build\src\catalog\catalog_entry\kuzu_catalog_entry.vcxproj]
C:\dev\kuzu\src\include\common/serializer/serializer.h(20,18): message : the constraint was not satisfied [C:\dev\kuzu\build\src\catalog\catalog_entry\kuzu_catalog_entry.vcxproj]
C:\dev\kuzu\src\include\common/serializer/serializer.h(20,62): message : the constraint was not satisfied [C:\dev\kuzu\build\src\catalog\catalog_entry\kuzu_catalog_entry.vcxproj]
C:\dev\kuzu\src\catalog\catalog_entry\table_catalog_entry.cpp(109,42): message : see reference to function template instantiation 'void kuzu::common::Serializer::serializeVector<kuzu::catalog::Property>(const std::vector<kuzu::catalog::Property,std::allocator<kuzu::cat
alog::Property>> &)' being compiled [C:\dev\kuzu\build\src\catalog\catalog_entry\kuzu_catalog_entry.vcxproj]

while compiling on MSVC for Windows 11 x64:

MSBuild version 17.9.8+b34f75857 for .NET Framework
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.22631.
-- The CXX compiler identification is MSVC 19.34.31948.0
-- The C compiler identification is MSVC 19.34.31948.0

All of the missing serializer implementations (for kuzu::common::Serializer::serializeVector) here:

  • kuzu::catalog::Property
  • kuzu::common::StructField
  • kuzu::parser::ParsedCaseAlternative

with current master (and starting from v0.4.0). d946982 still built fine.

@acquamarin
Copy link
Collaborator

Hi @zaddach
Thanks for reporting to us!

We will take a look soon.

@benjaminwinger
Copy link
Collaborator

The issue shouldn't be with Serializer::serializeValue, but with the requires expression in Serializer::serializeVector as it should be using Property::serialize instead of serializeValue, but evidently value.serialize(ser) is not compiling and its falling back to serializeValue, which fails because the type is not trivial.

if constexpr (requires(Serializer& ser) { value.serialize(ser); }) {
value.serialize(*this);
} else {
serializeValue<T>(value);
}

I'm not able to reproduce this with either MSVC 19.38.33130 or MSVC 19.39.33523.0, which are admittedly newer.
I've tried reproducing it in isolation here, but it works even with MSVC 19.34; it must be something subtler than just that the particular requires expression used doesn't work with that version of MSVC. The Serializer class hasn't changed since d946982 either.

I wonder if it's only happening with the three you listed, or if it's just stopping before reporting the others and everything which should use the serialize(Serializer&) method is failing.

Is it possible for you to try with a newer version of MSVC?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants