explicit instantiation of common Future types
[folly.git] / folly / IPAddressV4.h
index 42f5002d8340ba4fee1bcbadcc250423f20c3cba..7355648227ba0d6efc8c07ae21a5ccd141abe3da 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.
@@ -137,9 +137,10 @@ class IPAddressV4 : boost::totally_ordered<IPAddressV4> {
   bool inSubnetWithMask(const IPAddressV4& subnet, const ByteArray4 mask) const;
 
   // @see IPAddress#isLoopback
-  bool isLoopback() const {
-    return (INADDR_LOOPBACK == toLongHBO());
-  }
+  bool isLoopback() const;
+
+  // @see IPAddress#isLinkLocal
+  bool isLinkLocal() const;
 
   // @see IPAddress#isNonroutable
   bool isNonroutable() const;
@@ -228,6 +229,8 @@ class IPAddressV4 : boost::totally_ordered<IPAddressV4> {
 
  private:
   union AddressStorage {
+    static_assert(sizeof(in_addr) == sizeof(ByteArray4),
+                  "size of in_addr and ByteArray4 are different");
     in_addr inAddr_;
     ByteArray4 bytes_;
     AddressStorage() {