From 23eff5bbb49f1402139065948db7b5b6535d1abd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be>
Date: Wed, 2 Jun 2010 22:16:59 +0200
Subject: Don't use unknown_program_option.get_option_name() on older Boosts.


diff --git a/Swift/QtUI/main.cpp b/Swift/QtUI/main.cpp
index bd91fd4..c5f744a 100644
--- a/Swift/QtUI/main.cpp
+++ b/Swift/QtUI/main.cpp
@@ -7,6 +7,7 @@
 #include <boost/program_options/options_description.hpp>
 #include <boost/program_options/variables_map.hpp>
 #include <boost/program_options.hpp>
+#include <boost/version.hpp>
 
 #include <iostream>
 
@@ -20,7 +21,11 @@ int main(int argc, char* argv[]) {
 	try {
 		boost::program_options::store(boost::program_options::parse_command_line(argc, argv, desc), vm);
 	} catch (boost::program_options::unknown_option option) {
+#if BOOST_VERSION >= 104200
 		std::cout << "Ignoring unknown option " << option.get_option_name() << " but continuing." <<  std::endl;
+#else
+		std::cout << "Error: " << option.what() << " (continuing)" <<  std::endl;
+#endif
 	}
 	boost::program_options::notify(vm);
 	if (vm.count("help") > 0) {
-- 
cgit v0.10.2-6-g49f6