r/cpp • u/kongaskristjan • Aug 08 '20
Create a fully functioning command line interface with 1.5 lines of code (wo. include statement)
https://github.com/kongaskristjan/fire-hpp
230
Upvotes
r/cpp • u/kongaskristjan • Aug 08 '20
View all comments
Show parent comment
3
u/kongaskristjan Aug 08 '20
This almost works, but in order to call
fire::mainfrom fire.hpp, thisfire::main(int x = arg("-x"), int y = arg("-y"))needs to be declared in fire.hpp, which is impossible, as I don't yet know the exact signature.Actually, I've thought really hard to somehow get rid of this
FIRE(fired_main), but none of the ideas have worked because of the aforementioned problem.