Enable find/emplace for key types other than KeyT.
[folly.git] / folly / IPAddressV6.cpp
index 45e9e3a1ceea957668db595fbc6fdd17450ef3a6..f88d1b02891867a0c85d7ccb093c9db8b0135d1b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2014 Facebook, Inc.
+ * Copyright 2015 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -286,6 +286,7 @@ bool IPAddressV6::isPrivate() const {
   return isLoopback() || inBinarySubnet({{0xfc, 0x00}}, 7);
 }
 
+// public
 bool IPAddressV6::isLinkLocal() const {
   return inBinarySubnet({{0xfe, 0x80}}, 10);
 }
@@ -337,7 +338,7 @@ string IPAddressV6::str() const {
         buffer, INET6_ADDRSTRLEN,
         nullptr, 0, NI_NUMERICHOST)) {
     string ip(buffer);
-    return std::move(ip);
+    return ip;
   } else {
     throw IPAddressFormatException("Invalid address with hex ",
                                    "'", detail::Bytes::toHex(bytes(), 16), "'");