Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - requires std::is_base_of_v<Deleter, DerDel> UniquePtr(UniquePtr<T, DerDel>&& other) noexcept
- - : data_(other.data_.GetFirst(), std::move(other.data_.GetSecond())) {
- - other.data_.GetFirst() = nullptr;
- - }
- -
- - template <typename F>
- - requires std::is_base_of_v<T, F> UniquePtr(UniquePtr<F>&& other) noexcept
- - : data_(other.data_.GetFirst(), std::move(other.data_.GetSecond())) {
- + requires std::is_base_of_v<Deleter, DerDel> UniquePtr(UniquePtr<T, DerDel>&& other)
- + noexcept : data_(other.data_.GetFirst(), std::move(other.data_.GetSecond())) {
- + other.data_.GetFirst() = nullptr;
- + }
- +
- + template <typename F>
- + requires std::is_base_of_v<T, F> UniquePtr(UniquePtr<F>&& other)
- + noexcept : data_(other.data_.GetFirst(), std::move(other.data_.GetSecond())) {
- other.data_.GetFirst() = nullptr;
- }
- template <typename F, typename DerDel>
- - requires std::is_base_of_v<T, F> && std::is_base_of_v<Deleter, DerDel>
- - UniquePtr(UniquePtr<F, DerDel>&& other) noexcept
- - : data_(other.data_.GetFirst(), std::move(other.data_.GetSecond())) {
- + requires std::is_base_of_v<T, F> && std::is_base_of_v<Deleter, DerDel> UniquePtr(
- + UniquePtr<F, DerDel>&& other)
- + noexcept : data_(other.data_.GetFirst(), std::move(other.data_.GetSecond())) {
- other.data_.GetFirst() = nullptr;
- }
- @@ -174,8 +174,8 @@
- }
- template <typename F, typename DerDel>
- - requires std::is_base_of_v<T, F> && std::is_base_of_v<Deleter, DerDel>
- - UniquePtr& operator=(UniquePtr<F, DerDel>&& other) {
- + requires std::is_base_of_v<T, F> && std::is_base_of_v<Deleter, DerDel> UniquePtr& operator=(
- + UniquePtr<F, DerDel>&& other) {
- if (data_.GetFirst() == other.data_.GetFirst()) {
- return *this;
- }
- @@ -275,21 +275,21 @@
- }
- template <typename DerDel>
- - requires std::is_base_of_v<Deleter, DerDel> UniquePtr(UniquePtr<T, DerDel>&& other) noexcept
- - : data_(other.data_.GetFirst(), std::move(other.data_.GetSecond())) {
- - other.data_.GetFirst() = nullptr;
- - }
- -
- - template <typename F>
- - requires std::is_base_of_v<T, F> UniquePtr(UniquePtr<F>&& other) noexcept
- - : data_(other.data_.GetFirst(), std::move(other.data_.GetSecond())) {
- + requires std::is_base_of_v<Deleter, DerDel> UniquePtr(UniquePtr<T, DerDel>&& other)
- + noexcept : data_(other.data_.GetFirst(), std::move(other.data_.GetSecond())) {
- + other.data_.GetFirst() = nullptr;
- + }
- +
- + template <typename F>
- + requires std::is_base_of_v<T, F> UniquePtr(UniquePtr<F>&& other)
- + noexcept : data_(other.data_.GetFirst(), std::move(other.data_.GetSecond())) {
- other.data_.GetFirst() = nullptr;
- }
- template <typename F, typename DerDel>
- - requires std::is_base_of_v<T, F> && std::is_base_of_v<Deleter, DerDel>
- - UniquePtr(UniquePtr<F, DerDel>&& other) noexcept
- - : data_(other.data_.GetFirst(), std::move(other.data_.GetSecond())) {
- + requires std::is_base_of_v<T, F> && std::is_base_of_v<Deleter, DerDel> UniquePtr(
- + UniquePtr<F, DerDel>&& other)
- + noexcept : data_(other.data_.GetFirst(), std::move(other.data_.GetSecond())) {
- other.data_.GetFirst() = nullptr;
- }
- @@ -340,8 +340,8 @@
- }
- template <typename F, typename DerDel>
- - requires std::is_base_of_v<T, F> && std::is_base_of_v<Deleter, DerDel>
- - UniquePtr& operator=(UniquePtr<F, DerDel>&& other) {
- + requires std::is_base_of_v<T, F> && std::is_base_of_v<Deleter, DerDel> UniquePtr& operator=(
- + UniquePtr<F, DerDel>&& other) {
- if (data_.GetFirst() == other.data_.GetFirst()) {
- return *this;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement