summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/runtime-source.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/cli/runtime-source.cxx b/cli/runtime-source.cxx
index 13718b7..1be8f13 100644
--- a/cli/runtime-source.cxx
+++ b/cli/runtime-source.cxx
@@ -13,6 +13,7 @@ generate_runtime_source (context& ctx)
ostream& os (ctx.os);
os << "#include <map>" << endl
+ << "#include <set>" << endl
<< "#include <string>" << endl
<< "#include <vector>" << endl
<< "#include <ostream>" << endl
@@ -165,6 +166,21 @@ generate_runtime_source (context& ctx)
<< "}"
<< "};";
+ // parser<std::set<X>>
+ //
+ os << "template <typename X>" << endl
+ << "struct parser<std::set<X> >"
+ << "{"
+ << "static int" << endl
+ << "parse (std::set<X>& s, char** argv, int n)"
+ << "{"
+ << "X x;"
+ << "int i (parser<X>::parse (x, argv, n));"
+ << "s.insert (x);"
+ << "return i;"
+ << "}"
+ << "};";
+
// parser<std::map<K,V>>
//
os << "template <typename K, typename V>" << endl