Switch to std::variant?
Hi, with C++17 adoption progressing, are there existing plans to switch over from WTF::Variant to stdlib-provided std::variant implementations? Some GCC-and-libstdc++ configurations would still require a fallback implementation, just like with std::optional. Bug #175583 started work on importing a C++17-compliant implementation, but currently seems stalled. https://bugs.webkit.org/show_bug.cgi?id=175583 Are there any other reservations or obstacles about adopting std::variant? Cheers, Zan
On Wed, May 23, 2018 at 6:14 AM, zan@falconsigh.net wrote:
Some GCC-and-libstdc++ configurations would still require a fallback implementation
After the std::optional fiasco, I'm pretty nervous about the state of using new C++ 17 features. We've wound up in a situation where we're OK with increasing the compiler requirement to recent versions... as long as WebKit continues to build with ancient libstdc++. So increasing use of more C++ 17 standard library features seems difficult, and of really limited benefit if we're going to need to keep a fallback WTF implementation around, which will receive limited testing from us, but which will be used by most of our users in practice (at least for GTK). This is a hard problem. I don't have any answers. But I don't think our status quo is very good. https://bugs.webkit.org/show_bug.cgi?id=185198 is still unresolved and I'm out of ideas.... Michael
23.05.2018, 18:40, "Michael Catanzaro" <mcatanzaro@igalia.com>:
On Wed, May 23, 2018 at 6:14 AM, zan@falconsigh.net wrote:
Some GCC-and-libstdc++ configurations would still require a fallback implementation
After the std::optional fiasco, I'm pretty nervous about the state of using new C++ 17 features.
What do you mean under "std::optional fiasco"?
We've wound up in a situation where we're OK with increasing the compiler requirement to recent versions... as long as WebKit continues to build with ancient libstdc++. So increasing use of more C++ 17 standard library features seems difficult, and of really limited benefit if we're going to need to keep a fallback WTF implementation around, which will receive limited testing from us, but which will be used by most of our users in practice (at least for GTK).
This is a hard problem. I don't have any answers. But I don't think our status quo is very good. https://bugs.webkit.org/show_bug.cgi?id=185198 is still unresolved and I'm out of ideas....
Michael
_______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-dev
-- Regards, Konstantin
On Wed, May 23, 2018 at 10:52 AM, Konstantin Tokarev <annulen@yandex.ru> wrote:
What do you mean under "std::optional fiasco"?
Well we had a bunch of difficult build failures: https://bugs.webkit.org/show_bug.cgi?id=185159 https://bugs.webkit.org/show_bug.cgi?id=185194 https://bugs.webkit.org/show_bug.cgi?id=185198 That last one is still unresolved. Not sure if we should expect similar difficulty with std::variant. Michael
participants (3)
-
Konstantin Tokarev
-
Michael Catanzaro
-
zan@falconsigh.net