Make dynamic noexcept
[folly.git] / folly / FormatArg.h
index 48bfe2af8bb2061312b4fc488e4ef289e5b9c943..edd16a25cd25f141f1caf9d1e69489f7a706d4a1 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
    */
@@ -267,4 +273,3 @@ inline int FormatArg::splitIntKey() {
 }  // namespace folly
 
 #endif /* FOLLY_FORMATARG_H_ */
-