Explicitly reference folly::detail
authorChristopher Dykes <cdykes@fb.com>
Mon, 9 May 2016 18:36:40 +0000 (11:36 -0700)
committerFacebook Github Bot 4 <facebook-github-bot-4-bot@fb.com>
Mon, 9 May 2016 18:50:29 +0000 (11:50 -0700)
Summary: Due to some fun with the order MSVC does name lookup in templates, it ends up complaining that these are ambigious between folly::detail and folly::recordio_helpers::detail. The solution is to simply reference folly::detail explicitly.

Reviewed By: yfeldblum

Differential Revision: D3271606

fbshipit-source-id: e599ad8d8fe33b1e4ec0b838ddb5dfacfdf60159

folly/Bits.h

index 9d91aefa9bf7854f37226147a5d9ee3e1036fb80..b474617e6f94444193119620e0ef54a7272015c7 100644 (file)
@@ -281,7 +281,7 @@ FB_GEN(uint16_t, our_bswap16)
 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
 
 template <class T>
-struct EndianInt : public detail::EndianIntBase<T> {
+struct EndianInt : public EndianIntBase<T> {
  public:
   static T big(T x) { return EndianInt::swap(x); }
   static T little(T x) { return x; }
@@ -290,7 +290,7 @@ struct EndianInt : public detail::EndianIntBase<T> {
 #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
 
 template <class T>
-struct EndianInt : public detail::EndianIntBase<T> {
+struct EndianInt : public EndianIntBase<T> {
  public:
   static T big(T x) { return x; }
   static T little(T x) { return EndianInt::swap(x); }
@@ -337,13 +337,13 @@ class Endian {
 #endif  /* __BYTE_ORDER__ */
 
   template <class T> static T swap(T x) {
-    return detail::EndianInt<T>::swap(x);
+    return folly::detail::EndianInt<T>::swap(x);
   }
   template <class T> static T big(T x) {
-    return detail::EndianInt<T>::big(x);
+    return folly::detail::EndianInt<T>::big(x);
   }
   template <class T> static T little(T x) {
-    return detail::EndianInt<T>::little(x);
+    return folly::detail::EndianInt<T>::little(x);
   }
 
 #if !defined(__ANDROID__)