Designated Initializers and Older Compilers #108
-
First of all, thank you for nanobind! I've been working with it (along with pybind11) for the past month or so and I've had a great experience so far. nanobind fails to compile on Visual Studio 2017 and GCC 7.3.1 (the compiler version in the Red Hat Developer Toolset for RHEL 7) because it uses C++20 designated initializers for the What's the general feeling towards submitting a PR in this vein? On one hand, I understand that these compilers are relatively old now (and long due for an upgrade) but on the other hand this is a localized change that will facilitate the adoption of nanobind, especially since pytorch, etc. work with these older compilers. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I would accept such a change, it seems quite minor. Whenyou switch over to aggregate initializers, can you add comments indicating the field names? E.g. static Foo value {
.bar = ..
}; to static Foo value {
/* bar = */ ...
}; |
Beta Was this translation helpful? Give feedback.
I would accept such a change, it seems quite minor. Whenyou switch over to aggregate initializers, can you add comments indicating the field names? E.g.
to