view: add noexcept copy/move assign/construct conditions
This commit is contained in:
parent
2153feafc1
commit
0d7c2628f3
21
view.hpp
21
view.hpp
@ -167,11 +167,24 @@ namespace cruft {
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
constexpr view (const view &) noexcept = default;
|
||||
constexpr view (view &&) noexcept = default;
|
||||
constexpr view (const view &) noexcept (
|
||||
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;
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user