X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2Fexperimental%2Ftest%2FNestedCommandLineAppExample.cpp;h=9f1d3307c501a300c8c577842bc9214ea302676e;hb=9eadcfcdb4d766a4a10b3828d4a574c71a4ce70f;hp=6dfa2c2b8ffdb96a5f85834810912be21beffa59;hpb=321542683a01c3f334047531e9b487f047129775;p=folly.git diff --git a/folly/experimental/test/NestedCommandLineAppExample.cpp b/folly/experimental/test/NestedCommandLineAppExample.cpp index 6dfa2c2b..9f1d3307 100644 --- a/folly/experimental/test/NestedCommandLineAppExample.cpp +++ b/folly/experimental/test/NestedCommandLineAppExample.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2016 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. @@ -19,8 +19,8 @@ // Implements two commands: "cat" and "echo", which behave similarly to their // Unix homonyms. -#include #include +#include #include #include @@ -55,11 +55,11 @@ class Concatenator { size_t lineNumber_ = 0; }; -FOLLY_NORETURN void throwOutputError() { +[[noreturn]] void throwOutputError() { throw OutputError(folly::errnoStr(errno).toStdString()); } -FOLLY_NORETURN void throwInputError() { +[[noreturn]] void throwInputError() { throw InputError(folly::errnoStr(errno).toStdString()); } @@ -157,7 +157,7 @@ void runEcho(const po::variables_map& options, } } -} // namespace +} // namespace int main(int argc, char *argv[]) { // Initialize a NestedCommandLineApp object.