You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I naively compile using bond, I always get the following error message:
7>S:\vcpkg\installed\x64-windows-static\include\bond\protocol\encoding.h(53,5): error C3861: 'GenericWriteVariableUnsigned': identifier not found (compiling source file F:\Projects\Flashback\tests\FlashTest\bond_dictionary.cpp)
7>S:\vcpkg\installed\x64-windows-static\include\bond\protocol\encoding.h(53,5): message : 'GenericWriteVariableUnsigned': function was not declared in the template definition context and can be found only via argument-dependent lookup in the instantiation context (compiling source file F:\Projects\Flashback\tests\FlashTest\bond_dictionary.cpp)
7>S:\vcpkg\installed\x64-windows-static\include\bond\protocol\compact_binary.h(814): message : see reference to function template instantiation 'void bond::WriteVariableUnsigned<Flashback::Details::Bond::Stream,T>(Buffer &,T)' being compiled
7> with
7> [
7> T=uint32_t,
7> Buffer=Flashback::Details::Bond::Stream
7> ] (compiling source file F:\Projects\Flashback\tests\FlashTest\bond_dictionary.cpp)
7>S:\vcpkg\installed\x64-windows-static\include\bond\protocol\compact_binary.h(892): message : see reference to function template instantiation 'void bond::CompactBinaryWriter<Flashback::Details::Bond::Stream>::Write<uint32_t>(const T &)' being compiled
7> with
7> [
7> T=uint32_t
7> ] (compiling source file F:\Projects\Flashback\tests\FlashTest\bond_dictionary.cpp)
7>S:\vcpkg\installed\x64-windows-static\include\bond\protocol\compact_binary.h(892): message : see reference to function template instantiation 'void bond::CompactBinaryWriter<Flashback::Details::Bond::Stream>::Write<uint32_t>(const T &)' being compiled
7> with
7> [
7> T=uint32_t
7> ] (compiling source file F:\Projects\Flashback\tests\FlashTest\bond_dictionary.cpp)
7>S:\vcpkg\installed\x64-windows-static\include\bond\protocol\compact_binary.h(717): message : see reference to function template instantiation 'void bond::CompactBinaryWriter<Flashback::Details::Bond::Stream>::LengthBegin<Flashback::Details::Bond::Stream>(T &)' being compiled
7> with
7> [
7> T=Flashback::Details::Bond::Stream
7> ] (compiling source file F:\Projects\Flashback\tests\FlashTest\bond_dictionary.cpp)
7>S:\vcpkg\installed\x64-windows-static\include\bond\protocol\compact_binary.h(717): message : see reference to function template instantiation 'void bond::CompactBinaryWriter<Flashback::Details::Bond::Stream>::LengthBegin<Flashback::Details::Bond::Stream>(T &)' being compiled
7> with
7> [
7> T=Flashback::Details::Bond::Stream
7> ] (compiling source file F:\Projects\Flashback\tests\FlashTest\bond_dictionary.cpp)
7>S:\vcpkg\installed\x64-windows-static\include\bond\protocol\compact_binary.h(714): message : while compiling class template member function 'void bond::CompactBinaryWriter<Flashback::Details::Bond::Stream>::WriteStructBegin(const bond::Metadata &,bool)' (compiling source file F:\Projects\Flashback\tests\FlashTest\bond_dictionary.cpp)
7>S:\vcpkg\installed\x64-windows-static\include\bond\core\transforms.h(73): message : see reference to function template instantiation 'void bond::CompactBinaryWriter<Flashback::Details::Bond::Stream>::WriteStructBegin(const bond::Metadata &,bool)' being compiled (compiling source file F:\Projects\Flashback\tests\FlashTest\bond_dictionary.cpp)
7>F:\Projects\Flashback\tests\FlashTest\bond_dictionary.cpp(153): message : see reference to class template instantiation 'bond::CompactBinaryWriter<Flashback::Details::Bond::Stream>' being compiled
This seems to be because GenericWriteVariableUnsigned appears used before it is defined (encoding.h, line 45):
Some users are reporting that they are receiving error "C3861:
'GenericWriteVariableUnsigned': identifier not found" when building.
I think this happens when custom streams that _do not_ have their own
`WriteVariableUnsigned` member function.
Add a forward declaration of `GenericWriteVariableUnsigned`.
Fixesmicrosoft#1115
My hypothesis for why you are seeing this is that your Flashback::Details::Bond::Streamdoes not have a WriteVariableUnsigned(T value) member function. Is that the case? (A Bond stream doesn't need to have such a member function, but if one exists, it will be used over GenericWriteVariableUnsigned.)
If you add a definition of WriteVariableUnsigned(T value) to your Flashback::Details::Bond::Stream does this error go away?
My guess is that we're not seeing this in Bond itself because bond::OutputBuffer has such a member function, so the WriteVariableUnsigned specialization that invokes GenericWriteVariableUnsigned is not used.
Some users are reporting that they are receiving error "C3861:
'GenericWriteVariableUnsigned': identifier not found" when building.
I think this happens when custom streams that _do not_ have their own
`WriteVariableUnsigned` member function.
Add a forward declaration of `GenericWriteVariableUnsigned`.
Fixes#1115
When I naively compile using bond, I always get the following error message:
This seems to be because GenericWriteVariableUnsigned appears used before it is defined (encoding.h, line 45):
I always 'fix' this compile error with a forward declaration of GenericWriteVariableUnsigned:
Please let me know if this is an issue from my side or if this 'fix' should be included in future releases of bond.
Best,
Jean
The text was updated successfully, but these errors were encountered: