Add getIPv6For6To4 to IPAddressV4
[folly.git] / folly / IPAddressV4.h
index 7355648227ba0d6efc8c07ae21a5ccd141abe3da..bc7be1cf842a3e40ec1f892b3d01f06ee6ebd093 100644 (file)
@@ -98,6 +98,11 @@ class IPAddressV4 : boost::totally_ordered<IPAddressV4> {
   // Return the V6 mapped representation of the address.
   IPAddressV6 createIPv6() const;
 
+  /**
+   * Return a V6 address in the format of an 6To4 address.
+   */
+  IPAddressV6 getIPv6For6To4() const;
+
   // Return the long (network byte order) representation of the address.
   uint32_t toLong() const {
     return toAddr().s_addr;
@@ -180,7 +185,7 @@ class IPAddressV4 : boost::totally_ordered<IPAddressV4> {
   ByteArray4 toByteArray() const {
     ByteArray4 ba{{0}};
     std::memcpy(ba.data(), bytes(), 4);
-    return std::move(ba);
+    return ba;
   }
 
   // @see IPAddress#toFullyQualified