Move the traits factories up, and remove <boost/mpl/has_xxx.hpp>
[folly.git] / folly / DiscriminatedPtr.h
index 74f4150e84a7ca7ef3e8deacee574049de7586f6..43eb81e50a8ae4097d47b116083d52f10b40b28a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2013 Facebook, Inc.
+ * Copyright 2016 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * @author Tudor Bosman (tudorb@fb.com)
  */
 
-#ifndef FOLLY_DISCRIMINATEDPTR_H_
-#define FOLLY_DISCRIMINATEDPTR_H_
+#pragma once
 
 #include <limits>
 #include <stdexcept>
 #include <glog/logging.h>
-#include "folly/Likely.h"
-#include "folly/detail/DiscriminatedPtrDetail.h"
+#include <folly/Likely.h>
+#include <folly/Portability.h>
+#include <folly/detail/DiscriminatedPtrDetail.h>
 
-#ifndef __x86_64__
-# error "DiscriminatedPtr is x64-specific code."
+#if !FOLLY_X64 && !FOLLY_A64 && !FOLLY_PPC64
+# error "DiscriminatedPtr is x64, arm64 and ppc64 specific code."
 #endif
 
 namespace folly {
@@ -216,6 +216,3 @@ class DiscriminatedPtr {
 };
 
 }  // namespace folly
-
-#endif /* FOLLY_DISCRIMINATEDPTR_H_ */
-