Timeline for Variadic function to find the first matching (string) argument in a larger array
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 8, 2017 at 17:22 | comment | added | user128454 | @Stefan Considering you cared about having a compile-time version of this being functional, it felt like something you would really want. | |
Sep 8, 2017 at 17:16 | comment | added | Stefan | About 3: It's not really needed, I just dropped in this constructor and hard-coded string to have workable example here, in my use case I'd always start with an empty buffer which will be filled with incoming serial, radio packages or similar data. Fitting the buffer would be the opposite of what I want (which is to be able to send YAML-like data for easy debugging purposes). | |
Sep 8, 2017 at 17:13 | comment | added | user128454 | @Stefan Fair enough. I clearly do not have the ful picture of the context, so whatever makes the most sense for your codebase. | |
Sep 8, 2017 at 17:10 | history | edited | user128454 | CC BY-SA 3.0 |
added 411 characters in body
|
Sep 8, 2017 at 17:07 | vote | accept | Stefan | ||
Sep 8, 2017 at 17:07 | comment | added | Stefan | Fascinating, for me this was an exercise in seeing what can be done with fold expressions. I didn't know it was possible to add a second statement (the increment) in that way. Cool! About 2: The formatting is indeed nasty, no disagreement there (though not that hard to reason about). About 1: It's actually part of much larger generic buffer class for MCUs and the like, the whole thing would make this function hard to find, so I just shortened it and removed the extra indices for the moving access window the original buffer class has. | |
Sep 8, 2017 at 16:58 | history | answered | user128454 | CC BY-SA 3.0 |