From 720c5a33b6a49cf328fdd7611f49153cf8f60247 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 8 Apr 2020 14:51:57 +0300 Subject: Separate tests and examples into individual packages Also make cli module to be explicitly enabled via the config.cli configuration variable. --- examples/features/driver.cxx | 61 -------------------------------------------- 1 file changed, 61 deletions(-) delete mode 100644 examples/features/driver.cxx (limited to 'examples/features/driver.cxx') diff --git a/examples/features/driver.cxx b/examples/features/driver.cxx deleted file mode 100644 index 33ba362..0000000 --- a/examples/features/driver.cxx +++ /dev/null @@ -1,61 +0,0 @@ -// file : examples/features/driver.cxx -// author : Boris Kolpackov -// license : MIT; see accompanying LICENSE file - -#include -#include -#include - -#include "options.hxx" - -using namespace std; - -int -main (int argc, char* argv[]) -{ - try - { - features::options o (argc, argv); - - // --out-dir | -o - // - if (!o.out_dir ().empty ()) - cerr << "output dir: " << o.out_dir () << endl; - - // --first-name & --last-name - // - cerr << "first name: " << o.first_name () << endl - << "last name : " << o.last_name () << endl; - - // --vector | -v & --set | -s - // - if (!o.vector ().empty ()) - { - copy (o.vector ().begin (), o.vector ().end (), - ostream_iterator (cerr, " ")); - cerr << endl; - } - - if (!o.set ().empty ()) - { - copy (o.set ().begin (), o.set ().end (), - ostream_iterator (cerr, " ")); - cerr << endl; - } - - // --map | -m - // - typedef map str_map; - const str_map& m = o.map (); - str_map::const_iterator i (m.find ("a")); - - if (i != m.end ()) - cerr << "value for the 'a' key: " << i->second << endl; - - } - catch (const cli::exception& e) - { - cerr << e << endl; - return 1; - } -} -- cgit v1.1