Browse Source

input_iterator_pointer: no reason for which it shouldn't be copyable

Michele Caini 3 years ago
parent
commit
630ba195d1
2 changed files with 0 additions and 24 deletions
  1. 0 18
      src/entt/core/iterator.hpp
  2. 0 6
      test/entt/core/iterator.cpp

+ 0 - 18
src/entt/core/iterator.hpp

@@ -19,12 +19,6 @@ struct input_iterator_pointer final {
     /*! @brief Pointer type. */
     using pointer = Type *;
 
-    /*! @brief Default copy constructor, deleted on purpose. */
-    constexpr input_iterator_pointer(const input_iterator_pointer &) noexcept(std::is_nothrow_copy_constructible_v<value_type>) = delete;
-
-    /*! @brief Default move constructor. */
-    constexpr input_iterator_pointer(input_iterator_pointer &&) noexcept(std::is_nothrow_move_constructible_v<value_type>) = default;
-
     /**
      * @brief Constructs a proxy object by move.
      * @param val Value to use to initialize the proxy object.
@@ -32,18 +26,6 @@ struct input_iterator_pointer final {
     constexpr input_iterator_pointer(value_type &&val) noexcept(std::is_nothrow_move_constructible_v<value_type>)
         : value{std::move(val)} {}
 
-    /**
-     * @brief Default copy assignment operator, deleted on purpose.
-     * @return This proxy object.
-     */
-    constexpr input_iterator_pointer &operator=(const input_iterator_pointer &) noexcept(std::is_nothrow_copy_assignable_v<value_type>) = delete;
-
-    /**
-     * @brief Default move assignment operator.
-     * @return This proxy object.
-     */
-    constexpr input_iterator_pointer &operator=(input_iterator_pointer &&) noexcept(std::is_nothrow_move_assignable_v<value_type>) = default;
-
     /**
      * @brief Access operator for accessing wrapped values.
      * @return A pointer to the wrapped value.

+ 0 - 6
test/entt/core/iterator.cpp

@@ -9,12 +9,6 @@ struct clazz {
 };
 
 TEST(InputIteratorPointer, Functionalities) {
-    static_assert(!std::is_default_constructible_v<entt::input_iterator_pointer<clazz>>);
-    static_assert(!std::is_copy_constructible_v<entt::input_iterator_pointer<clazz>>);
-    static_assert(std::is_move_constructible_v<entt::input_iterator_pointer<clazz>>);
-    static_assert(!std::is_copy_assignable_v<entt::input_iterator_pointer<clazz>>);
-    static_assert(std::is_move_assignable_v<entt::input_iterator_pointer<clazz>>);
-
     clazz instance{};
     entt::input_iterator_pointer ptr{std::move(instance)};
     ptr->value = 42;