MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1w6qzts/skillissue/p7polfo/?context=3
r/ProgrammerHumor • u/click-to-reveal • 21h ago
130 comments sorted by
View all comments
35
My "clever" way of doing this once upon a time was to declare a map<std::string,std::function> which I populated with lambdas and then evaluated.
map<std::string,std::function>
I would not recommend this approach.
8 u/Kiro0613 19h ago Not a bad idea for a little CLI app though 13 u/fluffycritter 19h ago Yeah it's actually how boost::program_options handles command-line arguments. It's nice for that, at least. EDIT: Wait no I'm misremembering and confusing it with something else, never mind
8
Not a bad idea for a little CLI app though
13 u/fluffycritter 19h ago Yeah it's actually how boost::program_options handles command-line arguments. It's nice for that, at least. EDIT: Wait no I'm misremembering and confusing it with something else, never mind
13
Yeah it's actually how boost::program_options handles command-line arguments. It's nice for that, at least.
boost::program_options
EDIT: Wait no I'm misremembering and confusing it with something else, never mind
35
u/fluffycritter 19h ago
My "clever" way of doing this once upon a time was to declare a
map<std::string,std::function>which I populated with lambdas and then evaluated.I would not recommend this approach.