iterable_adaptor: constructors are conditionally noexcept now

This commit is contained in:
Michele Caini
2022-05-09 08:32:11 +02:00
parent b92e4f7e65
commit 270829f05b

View File

@@ -68,7 +68,7 @@ struct iterable_adaptor final {
using sentinel = Sentinel;
/*! @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{},
last{} {}
@@ -77,7 +77,7 @@ struct iterable_adaptor final {
* @param from Begin 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)},
last{std::move(to)} {}