Make DestructorCheck::Safety no-copy, no-move
[folly.git] / folly / IPAddressV4.h
index 094969461934088b3ebad26bcf326d0e9a41fc8e..2de04f1c4ab568ef255b9507714770e59df7c506 100644 (file)
@@ -54,6 +54,10 @@ typedef std::array<uint8_t, 4> ByteArray4;
  */
 class IPAddressV4 {
  public:
+  // Max size of std::string returned by toFullyQualified.
+  static constexpr size_t kMaxToFullyQualifiedSize =
+      4 /*words*/ * 3 /*max chars per word*/ + 3 /*separators*/;
+
   // returns true iff the input string can be parsed as an ipv4-address
   static bool validate(StringPiece ip);
 
@@ -212,6 +216,9 @@ class IPAddressV4 {
   // @see IPAddress#toFullyQualified
   std::string toFullyQualified() const { return str(); }
 
+  // @see IPAddress#toFullyQualifiedAppend
+  void toFullyQualifiedAppend(std::string& out) const;
+
   // @see IPAddress#version
   uint8_t version() const { return 4; }