فهرست منبع

iota_iterator: constrain value type

skypjack 3 ماه پیش
والد
کامیت
80ffcda35d
1فایلهای تغییر یافته به همراه2 افزوده شده و 5 حذف شده
  1. 2 5
      src/entt/core/iterator.hpp

+ 2 - 5
src/entt/core/iterator.hpp

@@ -53,11 +53,8 @@ private:
  * @brief Plain iota iterator (waiting for C++20).
  * @tparam Type Value type.
  */
-template<typename Type>
-class iota_iterator final {
-    static_assert(std::is_integral_v<Type>, "Not an integral type");
-
-public:
+template<std::integral Type>
+struct iota_iterator final {
     /*! @brief Value type, likely an integral one. */
     using value_type = Type;
     /*! @brief Invalid pointer type. */