[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using gperf to allow switch-case over strings (in c++17)
From: |
Bruno Haible |
Subject: |
Re: Using gperf to allow switch-case over strings (in c++17) |
Date: |
Mon, 27 Dec 2021 15:25:35 +0100 |
By the way, what you wanted to achieve can be done by using the gperf
option '-t' and adding the relevant info as struct fields. E.g.
struct weekday {
const char *name;
bool workday;
};
This approach works without 'constexpr'; it works even in plain C.
Bruno