Implement adjacent_tokens_only() for GFlagValueSemanticBase
authorTom Hughes <tom@compton.nu>
Tue, 8 Sep 2015 01:23:00 +0000 (18:23 -0700)
committerfacebook-github-bot-9 <folly-bot@fb.com>
Tue, 8 Sep 2015 02:20:19 +0000 (19:20 -0700)
Summary: Needed for boost 1.59.0 which added this as a pure virtual function
in the value_semantic base class. Fixes #314.
Closes #315

Reviewed By: @yfeldblum

Differential Revision: D2419035

Pulled By: @JoelMarcey

folly/experimental/ProgramOptions.cpp

index c5d3715233cad1462ccf55f92e593cd2afd967e4..8146722e5192b7c28063433f2f98bf225f90ea3b 100644 (file)
@@ -19,6 +19,7 @@
 #include <unordered_map>
 #include <unordered_set>
 
+#include <boost/version.hpp>
 #include <gflags/gflags.h>
 #include <glog/logging.h>
 #include <folly/Conv.h>
@@ -80,6 +81,9 @@ class GFlagValueSemanticBase : public po::value_semantic {
     : info_(std::move(info)) { }
 
   std::string name() const override { return "arg"; }
+#if BOOST_VERSION >= 105900
+  bool adjacent_tokens_only() const override { return false; }
+#endif
   bool is_composing() const override { return false; }
   bool is_required() const override { return false; }
   // We handle setting the GFlags from parse(), so notify() does nothing.