allow command to accept "--" separator
[folly.git] / folly / experimental / test / NestedCommandLineAppExample.cpp
index 7d14ae3a7b79b8d630cc07b08578f24cd157babc..9f1d3307c501a300c8c577842bc9214ea302676e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -19,8 +19,8 @@
 // Implements two commands: "cat" and "echo", which behave similarly to their
 // Unix homonyms.
 
-#include <folly/String.h>
 #include <folly/ScopeGuard.h>
+#include <folly/String.h>
 #include <folly/experimental/NestedCommandLineApp.h>
 #include <folly/experimental/ProgramOptions.h>
 
@@ -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.