DymOK93 / DymOK93/KTL

Is static_assert in intrusive_ptr required?

Open
#207 1 comment 0 reactions 1 assignee Claimed by @DymOK93 View on GitHub
help wanted invalid
Dominant language
C++
Stars
99
Forks
21
PR merge metrics
No merged PRs in 30d

Description

https://github.com/DymOK93/KTL/blob/master/include/smart_pointer.hpp#L1357
Often this compile-time assertion gets in the way of finding the real cause of a compilation error.

Example:
```c++
template
class ContextBase {...};

template
void intrusive_ptr_add_ref(ContextBase* ptr) {...};

template
void intrusive_ptr_release(ContextBase* ptr) noexcept {...};

class SomeContext : ContextBase {...}; // Oops... Private inheritance due to a typo
```
In the case of a large project, it becomes almost impossible to debug this compilation error.
What do you think, @GeorgyFirsov?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.