cmake: fix path to FindGLog.cmake
[folly.git] / folly / DiscriminatedPtr.h
index 0d485f50580686477811a5c9dedb7ba03b3b0ec9..235559272744b1abc1d21890aa39d2d5376e0e21 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017 Facebook, Inc.
+ * Copyright 2011-present Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 #include <limits>
 #include <stdexcept>
+
 #include <glog/logging.h>
+
 #include <folly/Likely.h>
 #include <folly/Portability.h>
 #include <folly/detail/DiscriminatedPtrDetail.h>
 
-#if !FOLLY_X64 && !FOLLY_A64 && !FOLLY_PPC64
+#if !FOLLY_X64 && !FOLLY_AARCH64 && !FOLLY_PPC64
 # error "DiscriminatedPtr is x64, arm64 and ppc64 specific code."
 #endif
 
@@ -171,7 +173,9 @@ class DiscriminatedPtr {
   template <typename V>
   typename dptr_detail::VisitorResult<V, Types...>::type apply(V&& visitor) {
     size_t n = index();
-    if (n == 0) throw std::invalid_argument("Empty DiscriminatedPtr");
+    if (n == 0) {
+      throw std::invalid_argument("Empty DiscriminatedPtr");
+    }
     return dptr_detail::ApplyVisitor<V, Types...>()(
       n, std::forward<V>(visitor), ptr());
   }
@@ -180,7 +184,9 @@ class DiscriminatedPtr {
   typename dptr_detail::ConstVisitorResult<V, Types...>::type apply(V&& visitor)
   const {
     size_t n = index();
-    if (n == 0) throw std::invalid_argument("Empty DiscriminatedPtr");
+    if (n == 0) {
+      throw std::invalid_argument("Empty DiscriminatedPtr");
+    }
     return dptr_detail::ApplyConstVisitor<V, Types...>()(
       n, std::forward<V>(visitor), ptr());
   }
@@ -236,4 +242,4 @@ decltype(auto) apply_visitor(
   return variant.apply(std::forward<Visitor>(visitor));
 }
 
-}  // namespace folly
+} // namespace folly