You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
636 B

2 years ago
  1. /*****************************************************************************
  2. *
  3. * demo program - part of CLIPP (command line interfaces for modern C++)
  4. *
  5. * released under MIT license
  6. *
  7. * (c) 2017-2018 André Müller; foss@andremueller-online.de
  8. *
  9. *****************************************************************************/
  10. #include <iostream>
  11. #include <string>
  12. #include <clipp.h>
  13. int main()
  14. {
  15. using namespace clipp;
  16. using std::cout;
  17. auto cli = group(
  18. option("-a"),
  19. option("-ab")
  20. );
  21. cout << "flags are " << (cli.flags_are_prefix_free() ? "" : "not ")
  22. << "prefix free\n";
  23. }