/*
- * Copyright 2015 Facebook, Inc.
+ * Copyright 2015-present Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include <unordered_set>
#include <boost/version.hpp>
-#include <gflags/gflags.h>
#include <glog/logging.h>
+
#include <folly/Conv.h>
#include <folly/Portability.h>
+#include <folly/portability/GFlags.h>
namespace po = ::boost::program_options;
std::string name() const override { return "arg"; }
#if BOOST_VERSION >= 105900
- bool adjacent_tokens_only() const override { return false; }
+ bool adjacent_tokens_only() const {
+ return false;
+ }
#endif
bool is_composing() const override { return false; }
bool is_required() const override { return false; }
try {
val = this->parseValue(tokens);
this->transform(val);
- } catch (const std::exception& e) {
+ } catch (const std::exception&) {
throw po::invalid_option_value(
tokens.empty() ? std::string() : tokens.front());
}
X("bool", bool)
X("int32", int32_t)
X("int64", int64_t)
+ X("uint32", uint32_t)
X("uint64", uint64_t)
X("double", double)
X("string", std::string)
#undef X
};
-} // namespace
+} // namespace
po::options_description getGFlags(ProgramOptionsStyle style) {
static const std::unordered_set<std::string> gSkipFlags{
return result;
}
-} // namespace
+} // namespace
NestedCommandLineParseResult parseNestedCommandLine(
int argc, const char* const argv[],
return doParseNestedCommandLine(po::command_line_parser(cmdline), desc);
}
-} // namespaces
+} // namespace folly