Browse Source

core: move any_policy to fwd.hpp

Michele Caini 1 year ago
parent
commit
5903894032
2 changed files with 15 additions and 14 deletions
  1. 0 14
      src/entt/core/any.hpp
  2. 15 0
      src/entt/core/fwd.hpp

+ 0 - 14
src/entt/core/any.hpp

@@ -29,20 +29,6 @@ enum class any_operation : std::uint8_t {
 } // namespace internal
 /*! @endcond */
 
-/*! @brief Possible modes of an any object. */
-enum class any_policy : std::uint8_t {
-    /*! @brief Default mode, the object does not own any elements. */
-    empty,
-    /*! @brief Owning mode, the object owns a dynamically allocated element. */
-    dynamic,
-    /*! @brief Owning mode, the object owns an embedded element. */
-    embedded,
-    /*! @brief Aliasing mode, the object _points_ to a non-const element. */
-    ref,
-    /*! @brief Const aliasing mode, the object _points_ to a const element. */
-    cref
-};
-
 /**
  * @brief A SBO friendly, type-safe container for single values of any type.
  * @tparam Len Size of the storage reserved for the small buffer optimization.

+ 15 - 0
src/entt/core/fwd.hpp

@@ -2,10 +2,25 @@
 #define ENTT_CORE_FWD_HPP
 
 #include <cstddef>
+#include <cstdint>
 #include "../config/config.h"
 
 namespace entt {
 
+/*! @brief Possible modes of an any object. */
+enum class any_policy : std::uint8_t {
+    /*! @brief Default mode, the object does not own any elements. */
+    empty,
+    /*! @brief Owning mode, the object owns a dynamically allocated element. */
+    dynamic,
+    /*! @brief Owning mode, the object owns an embedded element. */
+    embedded,
+    /*! @brief Aliasing mode, the object _points_ to a non-const element. */
+    ref,
+    /*! @brief Const aliasing mode, the object _points_ to a const element. */
+    cref
+};
+
 // NOLINTNEXTLINE(cppcoreguidelines-avoid-c-arrays, modernize-avoid-c-arrays)
 template<std::size_t Len = sizeof(double[2]), std::size_t = alignof(double[2])>
 class basic_any;