@@ -547,8 +547,8 @@ class App {
547
547
// / Add set of options (No default, temp reference, such as an inline set)
548
548
template <typename T>
549
549
Option *add_set (std::string option_name,
550
- T &member, // /< The selected member of the set
551
- const std::set<T> && options, // /< The set of possibilities
550
+ T &member, // /< The selected member of the set
551
+ std::set<T> options, // /< The set of possibilities
552
552
std::string description = " " ) {
553
553
554
554
std::string simple_name = CLI::detail::split (option_name, ' ,' ).at (0 );
@@ -566,12 +566,12 @@ class App {
566
566
return opt;
567
567
}
568
568
569
- // / Add set of options (No default, non-temp reference, such as an existing set)
569
+ // / Add set of options (No default, set can be changed afterwords - do not destroy the set)
570
570
template <typename T>
571
- Option *add_set (std::string option_name,
572
- T &member, // /< The selected member of the set
573
- const std::set<T> &options, // /< The set of possibilities
574
- std::string description = " " ) {
571
+ Option *add_mutable_set (std::string option_name,
572
+ T &member, // /< The selected member of the set
573
+ const std::set<T> &options, // /< The set of possibilities
574
+ std::string description = " " ) {
575
575
576
576
std::string simple_name = CLI::detail::split (option_name, ' ,' ).at (0 );
577
577
CLI::callback_t fun = [&member, &options, simple_name](CLI::results_t res) {
@@ -588,11 +588,11 @@ class App {
588
588
return opt;
589
589
}
590
590
591
- // / Add set of options (with default, R value , such as an inline set)
591
+ // / Add set of options (with default, static set , such as an inline set)
592
592
template <typename T>
593
593
Option *add_set (std::string option_name,
594
- T &member, // /< The selected member of the set
595
- const std::set<T> && options, // /< The set of possibilities
594
+ T &member, // /< The selected member of the set
595
+ std::set<T> options, // /< The set of possibilities
596
596
std::string description,
597
597
bool defaulted) {
598
598
@@ -616,13 +616,13 @@ class App {
616
616
return opt;
617
617
}
618
618
619
- // / Add set of options (with default, L value reference, such as an existing set)
619
+ // / Add set of options (with default, set can be changed afterwards - do not destroy the set)
620
620
template <typename T>
621
- Option *add_set (std::string option_name,
622
- T &member, // /< The selected member of the set
623
- const std::set<T> &options, // /< The set of possibilities
624
- std::string description,
625
- bool defaulted) {
621
+ Option *add_mutable_set (std::string option_name,
622
+ T &member, // /< The selected member of the set
623
+ const std::set<T> &options, // /< The set of possibilities
624
+ std::string description,
625
+ bool defaulted) {
626
626
627
627
std::string simple_name = CLI::detail::split (option_name, ' ,' ).at (0 );
628
628
CLI::callback_t fun = [&member, &options, simple_name](CLI::results_t res) {
@@ -643,10 +643,10 @@ class App {
643
643
return opt;
644
644
}
645
645
646
- // / Add set of options, string only, ignore case (no default, R value )
646
+ // / Add set of options, string only, ignore case (no default, static set )
647
647
Option *add_set_ignore_case (std::string option_name,
648
- std::string &member, // /< The selected member of the set
649
- const std::set<std::string> && options, // /< The set of possibilities
648
+ std::string &member, // /< The selected member of the set
649
+ std::set<std::string> options, // /< The set of possibilities
650
650
std::string description = " " ) {
651
651
652
652
std::string simple_name = CLI::detail::split (option_name, ' ,' ).at (0 );
@@ -671,11 +671,12 @@ class App {
671
671
return opt;
672
672
}
673
673
674
- // / Add set of options, string only, ignore case (no default, L value)
675
- Option *add_set_ignore_case (std::string option_name,
676
- std::string &member, // /< The selected member of the set
677
- const std::set<std::string> &options, // /< The set of possibilities
678
- std::string description = " " ) {
674
+ // / Add set of options, string only, ignore case (no default, set can be changed afterwards - do not destroy the
675
+ // / set)
676
+ Option *add_mutable_set_ignore_case (std::string option_name,
677
+ std::string &member, // /< The selected member of the set
678
+ const std::set<std::string> &options, // /< The set of possibilities
679
+ std::string description = " " ) {
679
680
680
681
std::string simple_name = CLI::detail::split (option_name, ' ,' ).at (0 );
681
682
CLI::callback_t fun = [&member, &options, simple_name](CLI::results_t res) {
@@ -699,10 +700,10 @@ class App {
699
700
return opt;
700
701
}
701
702
702
- // / Add set of options, string only, ignore case (default, R value )
703
+ // / Add set of options, string only, ignore case (default, static set )
703
704
Option *add_set_ignore_case (std::string option_name,
704
- std::string &member, // /< The selected member of the set
705
- const std::set<std::string> && options, // /< The set of possibilities
705
+ std::string &member, // /< The selected member of the set
706
+ std::set<std::string> options, // /< The set of possibilities
706
707
std::string description,
707
708
bool defaulted) {
708
709
@@ -730,12 +731,12 @@ class App {
730
731
return opt;
731
732
}
732
733
733
- // / Add set of options, string only, ignore case (default, L value )
734
- Option *add_set_ignore_case (std::string option_name,
735
- std::string &member, // /< The selected member of the set
736
- const std::set<std::string> &options, // /< The set of possibilities
737
- std::string description,
738
- bool defaulted) {
734
+ // / Add set of options, string only, ignore case (default, set can be changed afterwards - do not destroy the set )
735
+ Option *add_mutable_set_ignore_case (std::string option_name,
736
+ std::string &member, // /< The selected member of the set
737
+ const std::set<std::string> &options, // /< The set of possibilities
738
+ std::string description,
739
+ bool defaulted) {
739
740
740
741
std::string simple_name = CLI::detail::split (option_name, ' ,' ).at (0 );
741
742
CLI::callback_t fun = [&member, &options, simple_name](CLI::results_t res) {
@@ -761,10 +762,10 @@ class App {
761
762
return opt;
762
763
}
763
764
764
- // / Add set of options, string only, ignore underscore (no default, R value )
765
+ // / Add set of options, string only, ignore underscore (no default, static set )
765
766
Option *add_set_ignore_underscore (std::string option_name,
766
- std::string &member, // /< The selected member of the set
767
- const std::set<std::string> && options, // /< The set of possibilities
767
+ std::string &member, // /< The selected member of the set
768
+ std::set<std::string> options, // /< The set of possibilities
768
769
std::string description = " " ) {
769
770
770
771
std::string simple_name = CLI::detail::split (option_name, ' ,' ).at (0 );
@@ -789,11 +790,12 @@ class App {
789
790
return opt;
790
791
}
791
792
792
- // / Add set of options, string only, ignore underscore (no default, L value)
793
- Option *add_set_ignore_underscore (std::string option_name,
794
- std::string &member, // /< The selected member of the set
795
- const std::set<std::string> &options, // /< The set of possibilities
796
- std::string description = " " ) {
793
+ // / Add set of options, string only, ignore underscore (no default, set can be changed afterwards - do not destroy
794
+ // / the set)
795
+ Option *add_mutable_set_ignore_underscore (std::string option_name,
796
+ std::string &member, // /< The selected member of the set
797
+ const std::set<std::string> &options, // /< The set of possibilities
798
+ std::string description = " " ) {
797
799
798
800
std::string simple_name = CLI::detail::split (option_name, ' ,' ).at (0 );
799
801
CLI::callback_t fun = [&member, &options, simple_name](CLI::results_t res) {
@@ -817,10 +819,10 @@ class App {
817
819
return opt;
818
820
}
819
821
820
- // / Add set of options, string only, ignore underscore (default, R value )
822
+ // / Add set of options, string only, ignore underscore (default, static set )
821
823
Option *add_set_ignore_underscore (std::string option_name,
822
- std::string &member, // /< The selected member of the set
823
- const std::set<std::string> && options, // /< The set of possibilities
824
+ std::string &member, // /< The selected member of the set
825
+ std::set<std::string> options, // /< The set of possibilities
824
826
std::string description,
825
827
bool defaulted) {
826
828
@@ -848,12 +850,13 @@ class App {
848
850
return opt;
849
851
}
850
852
851
- // / Add set of options, string only, ignore underscore (default, L value)
852
- Option *add_set_ignore_underscore (std::string option_name,
853
- std::string &member, // /< The selected member of the set
854
- const std::set<std::string> &options, // /< The set of possibilities
855
- std::string description,
856
- bool defaulted) {
853
+ // / Add set of options, string only, ignore underscore (default, set can be changed afterwards - do not destroy the
854
+ // / set)
855
+ Option *add_mutable_set_ignore_underscore (std::string option_name,
856
+ std::string &member, // /< The selected member of the set
857
+ const std::set<std::string> &options, // /< The set of possibilities
858
+ std::string description,
859
+ bool defaulted) {
857
860
858
861
std::string simple_name = CLI::detail::split (option_name, ' ,' ).at (0 );
859
862
CLI::callback_t fun = [&member, &options, simple_name](CLI::results_t res) {
@@ -879,10 +882,10 @@ class App {
879
882
return opt;
880
883
}
881
884
882
- // / Add set of options, string only, ignore underscore and case(no default, R value )
885
+ // / Add set of options, string only, ignore underscore and case (no default, static set )
883
886
Option *add_set_ignore_case_underscore (std::string option_name,
884
- std::string &member, // /< The selected member of the set
885
- const std::set<std::string> && options, // /< The set of possibilities
887
+ std::string &member, // /< The selected member of the set
888
+ std::set<std::string> options, // /< The set of possibilities
886
889
std::string description = " " ) {
887
890
888
891
std::string simple_name = CLI::detail::split (option_name, ' ,' ).at (0 );
@@ -907,11 +910,12 @@ class App {
907
910
return opt;
908
911
}
909
912
910
- // / Add set of options, string only, ignore underscore and case(no default, L value)
911
- Option *add_set_ignore_case_underscore (std::string option_name,
912
- std::string &member, // /< The selected member of the set
913
- const std::set<std::string> &options, // /< The set of possibilities
914
- std::string description = " " ) {
913
+ // / Add set of options, string only, ignore underscore and case (no default, set can be changed afterwards - do not
914
+ // / destroy the set)
915
+ Option *add_mutable_set_ignore_case_underscore (std::string option_name,
916
+ std::string &member, // /< The selected member of the set
917
+ const std::set<std::string> &options, // /< The set of possibilities
918
+ std::string description = " " ) {
915
919
916
920
std::string simple_name = CLI::detail::split (option_name, ' ,' ).at (0 );
917
921
CLI::callback_t fun = [&member, &options, simple_name](CLI::results_t res) {
@@ -935,10 +939,10 @@ class App {
935
939
return opt;
936
940
}
937
941
938
- // / Add set of options, string only, ignore underscore and case (default, R value )
942
+ // / Add set of options, string only, ignore underscore and case (default, static set )
939
943
Option *add_set_ignore_case_underscore (std::string option_name,
940
- std::string &member, // /< The selected member of the set
941
- const std::set<std::string> && options, // /< The set of possibilities
944
+ std::string &member, // /< The selected member of the set
945
+ std::set<std::string> options, // /< The set of possibilities
942
946
std::string description,
943
947
bool defaulted) {
944
948
@@ -966,12 +970,13 @@ class App {
966
970
return opt;
967
971
}
968
972
969
- // / Add set of options, string only, ignore underscore and case (default, L value)
970
- Option *add_set_ignore_case_underscore (std::string option_name,
971
- std::string &member, // /< The selected member of the set
972
- const std::set<std::string> &options, // /< The set of possibilities
973
- std::string description,
974
- bool defaulted) {
973
+ // / Add set of options, string only, ignore underscore and case (default, set can be changed afterwards - do not
974
+ // / destroy the set)
975
+ Option *add_mutable_set_ignore_case_underscore (std::string option_name,
976
+ std::string &member, // /< The selected member of the set
977
+ const std::set<std::string> &options, // /< The set of possibilities
978
+ std::string description,
979
+ bool defaulted) {
975
980
976
981
std::string simple_name = CLI::detail::split (option_name, ' ,' ).at (0 );
977
982
CLI::callback_t fun = [&member, &options, simple_name](CLI::results_t res) {
0 commit comments