cmake: add checks to generate folly-config.h correctly
[folly.git] / folly / Poly.h
index 6acac6826461223af938f2432d38bddc368122e9..f2f4b9008989407c6c0c41cf7086cc234a56a563 100644 (file)
 #include <typeinfo>
 #include <utility>
 
-#include <folly/Assume.h>
+#include <folly/CPortability.h>
 #include <folly/CppAttributes.h>
 #include <folly/Traits.h>
 #include <folly/detail/TypeList.h>
+#include <folly/lang/Assume.h>
 
 #if !defined(__cpp_inline_variables)
 #define FOLLY_INLINE_CONSTEXPR constexpr
@@ -175,7 +176,7 @@ struct PolyMembers {};
 /**
  * Exception type that is thrown on invalid access of an empty `Poly` object.
  */
-struct BadPolyAccess : std::exception {
+struct FOLLY_EXPORT BadPolyAccess : std::exception {
   BadPolyAccess() = default;
   char const* what() const noexcept override {
     return "BadPolyAccess";
@@ -186,7 +187,7 @@ struct BadPolyAccess : std::exception {
  * Exception type that is thrown when attempting to extract from a `Poly` a
  * value of the wrong type.
  */
-struct BadPolyCast : std::bad_cast {
+struct FOLLY_EXPORT BadPolyCast : std::bad_cast {
   BadPolyCast() = default;
   char const* what() const noexcept override {
     return "BadPolyCast";