Kaynağa Gözat

poly: fwd.hpp

Michele Caini 5 yıl önce
ebeveyn
işleme
c4be3e731a
3 değiştirilmiş dosya ile 18 ekleme ve 1 silme
  1. 1 0
      src/entt/fwd.hpp
  2. 15 0
      src/entt/poly/fwd.hpp
  3. 2 1
      src/entt/poly/poly.hpp

+ 1 - 0
src/entt/fwd.hpp

@@ -1,4 +1,5 @@
 #include "core/fwd.hpp"
 #include "entity/fwd.hpp"
+#include "poly/fwd.hpp"
 #include "resource/fwd.hpp"
 #include "signal/fwd.hpp"

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

@@ -0,0 +1,15 @@
+#ifndef ENTT_POLY_FWD_HPP
+#define ENTT_POLY_FWD_HPP
+
+
+namespace entt {
+
+
+template<typename Concept, std::size_t = sizeof(double[2])>
+class poly;
+
+
+}
+
+
+#endif

+ 2 - 1
src/entt/poly/poly.hpp

@@ -11,6 +11,7 @@
 #include "../core/any.hpp"
 #include "../core/type_info.hpp"
 #include "../core/type_traits.hpp"
+#include "fwd.hpp"
 
 
 namespace entt {
@@ -174,7 +175,7 @@ decltype(auto) poly_call(Poly &&self, Args &&... args) {
  * @tparam Concept Concept descriptor.
  * @tparam Len Size of the storage reserved for the small buffer optimization.
  */
-template<typename Concept, std::size_t Len = sizeof(double[2])>
+template<typename Concept, std::size_t Len>
 class poly: private Concept::template type<poly_base<poly<Concept, Len>>> {
     /*! @brief A poly base is allowed to snoop into a poly object. */
     friend struct poly_base<poly>;