Skip to content

Evaluate using std::variant for EncodableValue #61970

@stuartmorgan-g

Description

@stuartmorgan-g

EncodableValue is basically a custom std::variant because I didn't want to require C++17. However, now that code is only being used for Windows (and people building GLFW for very specific use cases), we require VS 2019, and that has C++17 support. Given that, we should see about replacing it.

There are two options:

  • Keep it basically the same, but use std::variant internally
  • Have std::variant become the API surface

I'd like to look at both options; depending on how usable the latter feels it may be preferable since it will not require people familiar with modern C++ to learn a new project-specific API, which is generally a win in the longer term.

This is interactive with #31174 since it'll need a solution for extensibility as well.

Metadata

Metadata

Labels

a: desktopRunning on desktope: glfwGLFW desktop embeddingengineflutter/engine related. See also e: labels.platform-windowsBuilding on or for Windows specifically

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions