X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2Fexperimental%2FProgramOptions.cpp;h=842cfbca8b802df58d110d92aebf5f65c7efc6c9;hb=7b116ffe3b116ffc3c2089ca0b864ca7ebb1d28c;hp=9e988514a4736a197b567c95e136a51c244f9b4e;hpb=4598dd7067fb84d53913acaf80d0df585ba4d0f7;p=folly.git diff --git a/folly/experimental/ProgramOptions.cpp b/folly/experimental/ProgramOptions.cpp index 9e988514..842cfbca 100644 --- a/folly/experimental/ProgramOptions.cpp +++ b/folly/experimental/ProgramOptions.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2016 Facebook, Inc. + * Copyright 2017 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -83,7 +83,9 @@ class GFlagValueSemanticBase : public po::value_semantic { 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; } @@ -119,7 +121,7 @@ void GFlagValueSemanticBase::parse(boost::any& valueStore, 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()); } @@ -235,6 +237,7 @@ const std::unordered_map gFlagAdders = { 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)