Author: zaroth
Date: Sat Jun 11 15:22:33 2011
New Revision: 49835

URL: http://svn.gna.org/viewcvs/wesnoth?rev=49835&view=rev
Log:
Added #ifed alternate to make up for incompatibility between boost 1.41
and 1.42.

Modified:
    trunk/src/commandline_options.cpp

Modified: trunk/src/commandline_options.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/commandline_options.cpp?rev=49835&r1=49834&r2=49835&view=diff
==============================================================================
--- trunk/src/commandline_options.cpp (original)
+++ trunk/src/commandline_options.cpp Sat Jun 11 15:22:33 2011
@@ -19,6 +19,8 @@
 #include "util.hpp"
 #include "lua/llimits.h"
 
+#include <boost/version.hpp>
+
 namespace po = boost::program_options;
 
 // this class is needed since boost has some templated operators>> declared 
internally for tuples and we don't want them to interfere. Existence of such 
operator>> apparently causes program_options to cause the custom class somehow 
specially... well, the boost::tuple default operator>>  format doesn't suit our 
needs anyway.
@@ -29,7 +31,11 @@
 {
     two_strings ret_val;
        if (values.size() != 2)
+#if BOOST_VERSION >= 104200
                throw 
po::validation_error(po::validation_error::invalid_option_value);
+#else
+               throw po::validation_error("Invalid number of strings provided 
to option requiring exactly two of them.");
+#endif
     ret_val.get<0>() = values.at(0);
     ret_val.get<1>() = values.at(1);
     v = ret_val;


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to