Skip to content

rastc/cxx

Repository files navigation

Designated initializer pre c++ 20

Godbolt

https://godbolt.org/z/xbdvdjejd

Usage

#include "cxx_init.h"

struct Person {
    std::string name;
    int age;
    std::string city;
    double height;
};

int main() {
    Person p = cxx(
        .name = "Alice",
        .age = 30,
        .city = "New York",
        .height = 5.6
    );
    
    return 0;
}

License

MIT License

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages