view: add noexcept copy/move assign/construct conditions

This commit is contained in:
Danny Robson 2019-05-24 12:16:37 +10:00
parent 2153feafc1
commit 0d7c2628f3

View File

@ -167,11 +167,24 @@ namespace cruft {
//--------------------------------------------------------------------- //---------------------------------------------------------------------
constexpr view (const view &) noexcept = default; constexpr view (const view &) noexcept (
constexpr view (view &&) noexcept = default; std::is_nothrow_copy_constructible_v<BeginT> && std::is_nothrow_copy_constructible_v<EndT>
) = default;
view& operator= (const view &rhs) noexcept = default;
view& operator= (view &&rhs) noexcept = default; constexpr view (view &&) noexcept (
std::is_nothrow_move_constructible_v<BeginT> && std::is_nothrow_move_constructible_v<EndT>
) = default;
view& operator= (view const &rhs) noexcept (
std::is_nothrow_copy_assignable_v<BeginT> && std::is_nothrow_copy_assignable_v<EndT>
) = default;
view& operator= (view &&rhs) noexcept (
std::is_nothrow_move_assignable_v<BeginT> && std::is_nothrow_move_assignable_v<EndT>
) = default;
//--------------------------------------------------------------------- //---------------------------------------------------------------------