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

Compile error in 1.74 Release Candidate #210

Closed
thebrandre opened this issue Jul 14, 2020 · 5 comments
Closed

Compile error in 1.74 Release Candidate #210

thebrandre opened this issue Jul 14, 2020 · 5 comments

Comments

@thebrandre
Copy link

When using the header serialization\optional.hpp with Visual Studio 2017, I'll get a compiler error:

d:\lib\boost_1921ec4c\boost\serialization\optional.hpp(98): error C2988: unrecognizable template declaration/definition
d:\lib\boost_1921ec4c\boost\serialization\optional.hpp(98): error C2143: syntax error: missing ';' before '<'
d:\lib\boost_1921ec4c\boost\serialization\optional.hpp(98): error C2059: syntax error: '<'
d:\lib\boost_1921ec4c\boost\serialization\optional.hpp(98): error C2065: 'T': undeclared identifier
d:\lib\boost_1921ec4c\boost\serialization\optional.hpp(98): error C2923: 'boost::optional': 'T' is not a valid template type argument for parameter 'T'
d:\lib\boost_1921ec4c\boost\serialization\optional.hpp(98): error C2143: syntax error: missing ';' before '{'
d:\lib\boost_1921ec4c\boost\serialization\optional.hpp(98): error C2447: '{': missing function header (old-style formal list?)

The simple solution:
Put a #include <boost/serialization/version.hpp> before #include <boost/serialization/optional.hpp> -- I guess this should be included directly in optional.hpp?

@robertramey
Copy link
Member

test_optional passes. What is the program you are compiling to produce this error?

@robertramey
Copy link
Member

anyway - I think I've fixed this. On the develop branch. Should appear in next release.

@thebrandre
Copy link
Author

Glad to hear that! Thanks!
To answer your question: I have compiled our internal code base (which is currently on boost-1.73 and uses boost.serialization a lot) with the release candidate. That's why I couldn't post the code snippts directly.

@thebrandre
Copy link
Author

The issue has been fixed in commit "clean up by removing unused headers" on develop but it has not been merged into master for 1.74.

Is it still possible to merge that commit?

@robertramey
Copy link
Member

Hmmm - I don't know. I don't know the current state of the release. I had supposed it would have been released by now. I have come to believe (through very bitter experience) that merging in any changes just before a release is a very bad idea. So my policy would be to merge this in as soon as 1.74 is released. This would mean that the changes have the whole development cycle to be tested. It means I can merge at "my leisure" and not be stuck in a situation where I'm no the hook for breaking the boost release - trust me: you don't want to be there.

I think the best thing would be for you to lend you voice to those who want to keep the release cycle short by not merging in stuff at the last minute.

jngrad added a commit to jngrad/espresso that referenced this issue Oct 28, 2020
This <boost/serialization/version.hpp> include guards against an issue
in boost::serialization from boost 1.74.0 that leads to compiler error
"explicit specialization of undeclared template struct 'version'" when
including <boost/serialization/optional.hpp>. More details in tickets:
boostorg/serialization#210
boostorg/serialization#217
thebrandre referenced this issue Nov 5, 2020
add version.hpp which might be needed
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

2 participants