Add method to parse parameter list in query string to folly::Uri
[folly.git] / folly / FormatArg.h
index 48bfe2af8bb2061312b4fc488e4ef289e5b9c943..b6a00187001ed7fe180aa16ac79c2aa44722f0cd 100644 (file)
 #define FOLLY_FORMATARG_H_
 
 #include <stdexcept>
-#include "folly/Conv.h"
-#include "folly/Likely.h"
-#include "folly/Portability.h"
-#include "folly/Range.h"
+#include <folly/Conv.h>
+#include <folly/Likely.h>
+#include <folly/Portability.h>
+#include <folly/Range.h>
 
 namespace folly {
 
@@ -46,6 +46,7 @@ struct FormatArg {
       sign(Sign::DEFAULT),
       basePrefix(false),
       thousandsSeparator(false),
+      trailingDot(false),
       width(kDefaultWidth),
       precision(kDefaultPrecision),
       presentation(kDefaultPresentation),
@@ -80,7 +81,7 @@ struct FormatArg {
   template <typename... Args>
   std::string errorStr(Args&&... args) const;
   template <typename... Args>
-  void error(Args&&... args) const FOLLY_NORETURN;
+  FOLLY_NORETURN void error(Args&&... args) const;
 
   /**
    * Full argument string, as passed in to the constructor.
@@ -128,6 +129,11 @@ struct FormatArg {
    */
   bool thousandsSeparator;
 
+  /**
+   * Force a trailing decimal on doubles which could be rendered as ints
+   */
+  bool trailingDot;
+
   /**
    * Field width
    */