Pārlūkot izejas kodu

iterable_adaptor: constructors are conditionally noexcept now

Michele Caini 3 gadi atpakaļ
vecāks
revīzija
270829f05b
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      src/entt/core/iterator.hpp

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

@@ -68,7 +68,7 @@ struct iterable_adaptor final {
     using sentinel = Sentinel;
     using sentinel = Sentinel;
 
 
     /*! @brief Default constructor. */
     /*! @brief Default constructor. */
-    constexpr iterable_adaptor()
+    constexpr iterable_adaptor() noexcept(std::is_nothrow_default_constructible_v<It> &&std::is_nothrow_default_constructible_v<Sentinel>)
         : first{},
         : first{},
           last{} {}
           last{} {}
 
 
@@ -77,7 +77,7 @@ struct iterable_adaptor final {
      * @param from Begin iterator.
      * @param from Begin iterator.
      * @param to End iterator.
      * @param to End iterator.
      */
      */
-    constexpr iterable_adaptor(iterator from, sentinel to)
+    constexpr iterable_adaptor(iterator from, sentinel to) noexcept(std::is_nothrow_move_constructible_v<It> &&std::is_nothrow_move_constructible_v<Sentinel>)
         : first{std::move(from)},
         : first{std::move(from)},
           last{std::move(to)} {}
           last{std::move(to)} {}