Compiling on Visual Studio in C++ mode has issues with compound literals.
Zerophase opened this issue · 4 comments
I think the only thing I need to replace to get this to compile on Visual Studio is the compound literals. The only thing is I'm not sure how to do that in a C++ standard compliant way. The larger application I'm developing has been using Clang, which understands compound literals damn well in C++, but GCC has some issues, and MSVC almost definitely has issues with them. Is there a means of replacing the compound literals in C friendly way? The only solution I've come up with so far involves variadic templates, but I believe the ones I've written need some massaging to work correctly.
FWIW, VS C compiler support has been greatly improved in more recent releases. The Sigil project regulularly uses Microsofts free VS C to compile our fork of gumbo into a dll that functions just fine.
Alright, I'll have to check that out.
our fork can be found here but the approach should work just as well with this (upstream) gumbo.
https://github.com/Sigil-Ebook/Sigil/tree/master/internal/gumbo
Thanks.