Skip to content

SharedPointer#15

Open
Meranolean wants to merge 9 commits intomasterfrom
shared_pointer
Open

SharedPointer#15
Meranolean wants to merge 9 commits intomasterfrom
shared_pointer

Conversation

@Meranolean
Copy link
Owner

No description provided.

@Meranolean Meranolean closed this Jun 14, 2021
@Meranolean Meranolean reopened this Jun 14, 2021
@Meranolean Meranolean closed this Jun 14, 2021
@Meranolean Meranolean reopened this Jun 14, 2021
@Meranolean Meranolean closed this Jun 14, 2021
@Meranolean Meranolean reopened this Jun 14, 2021
@Meranolean Meranolean closed this Jun 14, 2021
@Meranolean Meranolean reopened this Jun 14, 2021
@Meranolean Meranolean closed this Jun 14, 2021
@Meranolean Meranolean reopened this Jun 14, 2021
@Meranolean Meranolean closed this Jun 14, 2021
@Meranolean Meranolean reopened this Jun 14, 2021
class ControlBlock : public SharedWeakCount {
public:
// Your code goes here...
explicit ControlBlock(T* value) : value_(value) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

 value_{value}

return true;
}

std::size_t GetWeak() const {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

std::size_t -> size_t


protected:
// Your code goes here...
std::atomic<std::size_t> counter_ = 0;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

std::atomic<size_t> counter_{0};

@Meranolean Meranolean closed this Jun 14, 2021
@Meranolean Meranolean reopened this Jun 14, 2021
@Meranolean Meranolean closed this Jun 14, 2021
@Meranolean Meranolean reopened this Jun 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants