Skip to content

Add designated initialiser support to MSVC toolchain #162

@skaller

Description

@skaller

Yeah, one of the primary issues I'm having is that my $HOME\.felix folder (which is C:\Users\ari\.felix) doesn't have a config folder, only a cache folder, so I'm having to wing it in regards to what folder has the configuration files that it's looking for.

In regards to the MSVC error, there's something weird going on in general. If you look a few lines above the error, you'll also see this:

[flx_depchk] C++ Dependency generator FAILED on C:\Users\ari\.felix\cache\text\D\Code\GitHub\felix\src\web\tutopt\sdlgui\gui_01_window_01.cpp

I searched the error earlier and found this. I'm not entirely sure that setting that flag will fix the problem.

Here's part of a response to someone else getting this error:

That said, C++ designated initializers are slightly different than C designated initializers. Designating array elements is not allowed (because the syntax conflicts with lambda declarations), you cannot re-order the initializers from the member declaration order, and you also cannot access nested members in the designator. See https://en.cppreference.com/w/cpp/language/aggregate_initialization#Designated_initializers (the note at the bottom). So, your code will fail to parse in C++20 mode.

According to this, designated initialization was added to Visual Studio 2019 in July, which is after the last time that I built Felix. It seems that a more permanent fix might be necessary for compatibility with VS2019/16.1+.

Originally posted by @arabelladonna in #149 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions