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

Visual Studio 2013 support and related fixes #8539

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

constrictor
Copy link

The goal of this changeset is to make flatbuffers compile on VS2013, which mostly supports C++11.
This includes:

  1. Fixing C++11 keywords (noexcept, constexpr) being used directly instead of already existing FLATBUFFERS_* defines that were created exactly for such old compiler support.
  2. Fixing VS2013 not supporting defaulting move constructors - by using the existing FLATBUFFERS_DEFAULT_DECLARATION define.
  3. Fixed generic bug that was seen crashing flatc on VS2013 - taking reference to a value returned from function.
  4. Added special handling for string to float and vice versa conversions because VS2013 runtime wasn't doing that according to standard (this was fixed in VS2015).
  5. More significant change: VS2013 has buggy handling of template template parameter packs, which is the case for Vector<T, SizeT>: see the https://godbolt.org/z/Trfrsja46 for a completely valid code that fails to build in VS2013. I tried to work around it without breaking API.

@github-actions github-actions bot added c++ codegen Involving generating code from schema labels Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ codegen Involving generating code from schema
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant