Explorar el Código

entt: enclose expression in parentheses

skypjack hace 1 mes
padre
commit
6ce08bc01d

+ 2 - 2
src/entt/container/dense_map.hpp

@@ -82,7 +82,7 @@ public:
         : it{iter} {}
 
     template<typename Other>
-    requires !std::same_as<It, Other> && std::constructible_from<It, Other>
+    requires (!std::same_as<It, Other> && std::constructible_from<It, Other>)
     constexpr dense_map_iterator(const dense_map_iterator<Other> &other) noexcept
         : it{other.it} {}
 
@@ -177,7 +177,7 @@ public:
           offset{pos} {}
 
     template<typename Other>
-    requires !std::same_as<It, Other> && std::constructible_from<It, Other>
+    requires (!std::same_as<It, Other> && std::constructible_from<It, Other>)
     constexpr dense_map_local_iterator(const dense_map_local_iterator<Other> &other) noexcept
         : it{other.it},
           offset{other.offset} {}

+ 2 - 2
src/entt/container/dense_set.hpp

@@ -49,7 +49,7 @@ public:
         : it{iter} {}
 
     template<typename Other>
-    requires !std::same_as<It, Other> && std::constructible_from<It, Other>
+    requires (!std::same_as<It, Other> && std::constructible_from<It, Other>)
     constexpr dense_set_iterator(const dense_set_iterator<Other> &other) noexcept
         : it{other.it} {}
 
@@ -141,7 +141,7 @@ public:
           offset{pos} {}
 
     template<typename Other>
-    requires !std::same_as<It, Other> && std::constructible_from<It, Other>
+    requires (!std::same_as<It, Other> && std::constructible_from<It, Other>)
     constexpr dense_set_local_iterator(const dense_set_local_iterator<Other> &other) noexcept
         : it{other.it},
           offset{other.offset} {}

+ 1 - 1
src/entt/resource/cache.hpp

@@ -43,7 +43,7 @@ public:
         : it{iter} {}
 
     template<typename Other>
-    requires !std::same_as<It, Other> && std::constructible_from<It, Other>
+    requires (!std::same_as<It, Other> && std::constructible_from<It, Other>)
     constexpr resource_cache_iterator(const resource_cache_iterator<std::remove_const_t<Type>, Other> &other) noexcept
         : it{other.it} {}
 

+ 3 - 3
src/entt/resource/resource.hpp

@@ -63,7 +63,7 @@ public:
      * @param other The handle to copy from.
      */
     template<typename Other>
-    requires !std::same_as<Type, Other> && std::constructible_from<Type &, Other &>
+    requires (!std::same_as<Type, Other> && std::constructible_from<Type &, Other &>)
     resource(const resource<Other> &other) noexcept
         : value{other.value} {}
 
@@ -73,8 +73,8 @@ public:
      * @param other The handle to move from.
      */
     template<typename Other>
-    requires !std::same_as<Type, Other> && std::constructible_from<Type &, Other &>
-    resource(resource<Other> && other) noexcept
+    requires (!std::same_as<Type, Other> && std::constructible_from<Type &, Other &>)
+    resource(resource<Other> &&other) noexcept
         : value{std::move(other.value)} {}
 
     /*! @brief Default destructor. */